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

@ -29,12 +29,12 @@ module Vool
end
# create mom instructions
def to_mom( method )
def to_mom( compiler )
raise "Empty list ? #{statements.length}" if empty?
stats = @statements.dup
flat = stats.shift.to_mom(method)
flat = stats.shift.to_mom(compiler)
while( nekst = stats.shift )
flat.append nekst.to_mom(method)
flat.append nekst.to_mom(compiler)
end
flat
end