load parfait soml files

No dir glob for precise order
This commit is contained in:
Torsten Ruger 2015-11-07 17:38:27 +02:00
parent d878ce00d8
commit 50b03a5e94
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,7 @@
class Object
Layout get_layout()
return get_internal(1)
end
end