Sha256: 3265c127b6228da635acd6c9f678d4f5c08f95457d390d7fca36dcd76e2384f0

Contents?: true

Size: 1.16 KB

Versions: 37

Compression:

Stored size: 1.16 KB

Contents

require 'bake/model/metamodel'

require 'rtext/language'



module Cxxproject

  class Idp
    def call(e,unused)
      e.respond_to?(:ident) ? e.ident() : nil # IdentifierProvider.qualified_name(e)
    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 == "UserLibrary"
        ["lib"]
      elsif c.name == "DefaultToolchain"
        ["basedOn"]
      else
        ["name"]
      end
    },
    :identifier_provider => Idp.new,
    :line_number_attribute => "line_number",
    :file_name_attribute => "file_name",
    :fragment_ref_attribute => "fragment_ref"#,
  )

end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
bake-toolkit-1.6.3 lib/bake/model/language.rb
bake-toolkit-1.6.2 lib/bake/model/language.rb
bake-toolkit-1.6.1 lib/bake/model/language.rb
bake-toolkit-1.6.0 lib/bake/model/language.rb
bake-toolkit-1.5.0 lib/bake/model/language.rb
bake-toolkit-1.4.0 lib/bake/model/language.rb
bake-toolkit-1.3.0 lib/bake/model/language.rb
bake-toolkit-1.2.1 lib/bake/model/language.rb
bake-toolkit-1.2.0 lib/bake/model/language.rb
bake-toolkit-1.1.0 lib/bake/model/language.rb
bake-toolkit-1.0.27 lib/bake/model/language.rb
bake-toolkit-1.0.26 lib/bake/model/language.rb
bake-toolkit-1.0.25 lib/bake/model/language.rb
bake-toolkit-1.0.24 lib/bake/model/language.rb
bake-toolkit-1.0.23 lib/bake/model/language.rb
bake-toolkit-1.0.22 lib/bake/model/language.rb
bake-toolkit-1.0.21 lib/bake/model/language.rb
bake-toolkit-1.0.20 lib/bake/model/language.rb
bake-toolkit-1.0.19 lib/bake/model/language.rb
bake-toolkit-1.0.18 lib/bake/model/language.rb