bring class methods down to mom

not functionally correct, still compiling into class, not metaclass
part of #24
This commit is contained in:
Torsten Ruger
2019-02-16 17:54:45 +02:00
parent 40581494de
commit 2fbea82039
5 changed files with 65 additions and 11 deletions

View File

@ -20,7 +20,9 @@ module Vool
def to_mom( _ )
create_class_object
method_compilers = body.statements.collect do |node|
raise "Only methods for now #{node}" unless node.is_a?(MethodStatement)
unless node.is_a?(MethodStatement) or node.is_a?(ClassMethodStatement)
raise "Only methods for now #{node.class}:#{node}"
end
node.to_mom(@clazz)
end
Mom::MomCompiler.new(method_compilers)