fix return statement to actually return

fix a million tests
This commit is contained in:
Torsten Ruger
2015-10-27 21:04:46 +02:00
parent 79cf59c4e2
commit 142c36a374
16 changed files with 61 additions and 59 deletions

View File

@ -1,9 +1,10 @@
module Soml
Compiler.class_eval do
# return attr_reader :statement
def on_return statement
return process(statement.to_a.first )
reg = process(statement.first )
add_code Register.set_slot( statement, reg , :message , :return_value)
nil # statements don't return
end
end
end