Sha256: 2fb14ad3b60223245cc2eaf5dcbb59ec27e5e6bbfdd1a14c9943bdc36c5db94b

Contents?: true

Size: 1.05 KB

Versions: 79

Compression:

Stored size: 1.05 KB

Contents

require 'bake/model/metamodel'

require 'rtext/language'



module Bake

  class Idp
    def call(e,notUsed1,notUsed2,notUsed3)
      e.respond_to?(:ident) ? e.ident() : nil
    end
  end


  Language =
  RText::Language.new(Metamodel.ecore,
    :feature_provider => proc {|c|
      RGen::Serializer::OppositeReferenceFilter.call(c.eAllStructuralFeatures).reject {|f|
        f.eAnnotations.any? {|a|
          a.details.any? {|d| d.key == 'internal' && d.value == 'true'}
        }
      }
    },
    :unlabled_arguments => proc {|c|
      if c.name == "Compiler" or c.name == "CompilerAdaptions"
        ["ctype"]
      elsif c.name == "Define"
        ["str"]
      elsif c.name == "Flags" or c.name == "LibPostfixFlags" or c.name == "LibPrefixFlags"
        ["overwrite"]
      elsif c.name == "DefaultToolchain"
        ["basedOn"]
      elsif c.name == "Description"
        ["text"]
      else
        ["name"]
      end
    },
    :identifier_provider => Idp.new,
    :line_number_attribute => "line_number",
    :fragment_ref_attribute => "fragment_ref"
  )

end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
bake-toolkit-2.42.3 lib/bake/model/language.rb
bake-toolkit-2.42.2 lib/bake/model/language.rb
bake-toolkit-2.42.1 lib/bake/model/language.rb
bake-toolkit-2.42.0 lib/bake/model/language.rb
bake-toolkit-2.41.4 lib/bake/model/language.rb
bake-toolkit-2.41.3 lib/bake/model/language.rb
bake-toolkit-2.41.2 lib/bake/model/language.rb
bake-toolkit-2.41.1 lib/bake/model/language.rb
bake-toolkit-2.41.0 lib/bake/model/language.rb
bake-toolkit-2.40.1 lib/bake/model/language.rb
bake-toolkit-2.40.0 lib/bake/model/language.rb
bake-toolkit-2.39.1 lib/bake/model/language.rb
bake-toolkit-2.39.0 lib/bake/model/language.rb
bake-toolkit-2.38.3 lib/bake/model/language.rb
bake-toolkit-2.38.2 lib/bake/model/language.rb
bake-toolkit-2.38.1 lib/bake/model/language.rb
bake-toolkit-2.38.0 lib/bake/model/language.rb
bake-toolkit-2.37.14 lib/bake/model/language.rb
bake-toolkit-2.37.13 lib/bake/model/language.rb
bake-toolkit-2.37.12 lib/bake/model/language.rb