start with block_compiler

as a copy of method_compiler
re-merge later, when we know what's needed
This commit is contained in:
Torsten Ruger
2018-07-09 16:48:23 +03:00
parent 7231f301ba
commit dd544214b3
10 changed files with 159 additions and 13 deletions

View File

@ -11,7 +11,11 @@ module Vool
def to_mom(clazz)
@clazz = clazz || raise( "no class in #{self}")
method = @clazz.add_method_for(name , make_arg_type , make_frame , body )
method.compiler_for(clazz.instance_type)
compiler = method.compiler_for(clazz.instance_type)
each do |node| ## TODO: must account for nested blocks (someday)
node.to_mom(compiler) if node.is_a?(BlockStatement)
end
compiler
end
def each(&block)