Fix vool assignments after call rework

also small fix for if and return, as they need to execute sneds and yields (not just sends), so testing for Call not SendStatement
This commit is contained in:
2019-08-16 20:39:08 +03:00
parent e6c30d98fb
commit 7c91a08d5b
9 changed files with 103 additions and 44 deletions

View File

@ -9,10 +9,10 @@ module Ruby
end
def to_vool
val , rest = *normalize_name(@return_value)
me = Vool::ReturnStatement.new(val.to_vool)
return me unless rest
Vool::Statements.new([ rest.to_vool , me])
val , hoisted = *normalized_vool(@return_value)
me = Vool::ReturnStatement.new(val)
return me unless hoisted
Vool::Statements.new( hoisted ) << me
end
def to_s(depth = 0)