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