passing compiler to to_mom, not method

To be able to delegate scope (block/method) things later
This commit is contained in:
Torsten Ruger
2018-07-05 14:02:38 +03:00
parent 16d91f24ce
commit 3f80953385
15 changed files with 78 additions and 74 deletions

View File

@ -30,8 +30,8 @@ module Parfait
def compiler_for(for_type)
typed_method = create_typed_method(for_type)
head = source.to_mom( typed_method )
compiler = Risc::MethodCompiler.new( typed_method )
head = source.to_mom( compiler )
compiler.add_mom(head)
compiler
end