rubyx/lib/soml/compiler/class_statement.rb
Torsten Ruger 229f5896c6 update to use new ast
soml was updated to have a typed ast layer to make programatic creation
easier
this brings LOTS of syntax change with it, that does not really mean
anything at all
All tests pass again so back to the same
2016-03-07 11:55:28 +02:00

15 lines
434 B
Ruby

module Soml
Compiler.class_eval do
def on_ClassStatement statement
#puts statement.inspect
raise "classes dont yet play babushka, get coding #{name}" if @clazz
@clazz = Parfait::Space.object_space.get_class_by_name! statement.name
#puts "Compiling class #{@clazz.name.inspect}"
statement_value = process(statement.statements).last
@clazz = nil
return statement_value
end
end
end