Sha256: 4d408122389626fe8bdc17d9a5194dcc590c693313d50b65fcc1277817712dbe

Contents?: true

Size: 1.14 KB

Versions: 48

Compression:

Stored size: 1.14 KB

Contents

require_relative '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"]
      elsif c.name == "SrcFileEndings"
        ["endings"]
      else
        ["name"]
      end
    },
    :identifier_provider => Idp.new,
    :line_number_attribute => "line_number",
    :fragment_ref_attribute => "fragment_ref"
  )

end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
bake-toolkit-2.72.0 lib/bake/model/language.rb
bake-toolkit-2.71.0 lib/bake/model/language.rb
bake-toolkit-2.70.1 lib/bake/model/language.rb
bake-toolkit-2.70.0 lib/bake/model/language.rb
bake-toolkit-2.69.0 lib/bake/model/language.rb
bake-toolkit-2.68.1 lib/bake/model/language.rb
bake-toolkit-2.68.0 lib/bake/model/language.rb
bake-toolkit-2.67.0 lib/bake/model/language.rb
bake-toolkit-2.66.0 lib/bake/model/language.rb
bake-toolkit-2.65.2 lib/bake/model/language.rb
bake-toolkit-2.65.1 lib/bake/model/language.rb
bake-toolkit-2.65.0 lib/bake/model/language.rb
bake-toolkit-2.64.4 lib/bake/model/language.rb
bake-toolkit-2.64.3 lib/bake/model/language.rb
bake-toolkit-2.64.2 lib/bake/model/language.rb
bake-toolkit-2.64.1 lib/bake/model/language.rb
bake-toolkit-2.64.0 lib/bake/model/language.rb
bake-toolkit-2.63.2 lib/bake/model/language.rb
bake-toolkit-2.63.1 lib/bake/model/language.rb
bake-toolkit-2.63.0 lib/bake/model/language.rb