2015-10-23 13:22:55 +02:00
|
|
|
module Soml
|
2015-10-09 16:51:14 +02:00
|
|
|
Compiler.class_eval do
|
|
|
|
|
2016-03-07 10:55:28 +01:00
|
|
|
def on_ClassStatement statement
|
2015-10-09 16:51:14 +02:00
|
|
|
#puts statement.inspect
|
|
|
|
raise "classes dont yet play babushka, get coding #{name}" if @clazz
|
2016-03-07 10:55:28 +01:00
|
|
|
@clazz = Parfait::Space.object_space.get_class_by_name! statement.name
|
2015-10-15 09:27:06 +02:00
|
|
|
#puts "Compiling class #{@clazz.name.inspect}"
|
2016-03-07 10:55:28 +01:00
|
|
|
statement_value = process(statement.statements).last
|
2015-10-09 16:51:14 +02:00
|
|
|
@clazz = nil
|
|
|
|
return statement_value
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|