return assemblers from translation

result of translate is cpu instructions, our equivalent of assembly.
So return Assemblers for next stage
This commit is contained in:
Torsten Ruger
2018-07-01 11:56:09 +03:00
parent 3813de19fc
commit f7dfa1c45e
2 changed files with 27 additions and 14 deletions

View File

@ -24,12 +24,12 @@ module Vool
def to_mom( _ )
create_class_object
methods = []
method_compilers = []
body.statements.each do |node|
raise "Only methods for now #{node}" unless node.is_a?(MethodStatement)
methods << node.to_mom(@clazz)
method_compilers << node.to_mom(@clazz)
end
Mom::ClassCompiler.new(@clazz , methods)
Mom::ClassCompiler.new(@clazz , method_compilers)
end
def each(&block)