diff --git a/lib/soml/compiler.rb b/lib/soml/compiler.rb index 19ca9fe5..3349c8c9 100644 --- a/lib/soml/compiler.rb +++ b/lib/soml/compiler.rb @@ -143,6 +143,15 @@ module Soml raise "space is a reserved name" if name == :space name end + + def self.load_parfait + ["object"].each do |o| + str = File.open(File.expand_path("parfait/#{o}.soml", File.dirname(__FILE__))).read + syntax = Parser::Salama.new.parse_with_debug(str) + parts = Parser::Transform.new.apply(syntax) + self.new.process( parts ) + end + end end end diff --git a/lib/soml/parfait/object.soml b/lib/soml/parfait/object.soml new file mode 100644 index 00000000..6821dcad --- /dev/null +++ b/lib/soml/parfait/object.soml @@ -0,0 +1,7 @@ +class Object + + Layout get_layout() + return get_internal(1) + end + +end