Fix ruby normalising to_vool

So that vool layer never has complex conditions or returns
Start with while, next if, return and assign
This commit is contained in:
2019-08-16 14:09:56 +03:00
parent 84b9811e55
commit c213cf874b
10 changed files with 40 additions and 31 deletions

View File

@ -12,8 +12,8 @@ module Ruby
end
def to_vool
cond , rest = *normalize_name(@condition)
Vool::WhileStatement.new(cond.to_vool , @body.to_vool , rest&.to_vool)
cond , hoisted = *normalized_vool(@condition)
Vool::WhileStatement.new(cond , @body.to_vool , hoisted)
end
def to_s(depth = 0)