fixed while compilation (block order) and fixed and improved fibo

This commit is contained in:
Torsten Ruger
2014-06-12 16:23:57 +03:00
parent 8da1bc4645
commit ea0572c836
4 changed files with 28 additions and 29 deletions

View File

@@ -3,8 +3,8 @@ module Ast
# attr_reader :condition, :body
def compile context
into = context.function
while_block = into.new_block "while"
ret = into.new_block "return"
ret = into.new_block "while_end"
while_block = into.new_block "while_start"
into.insert_at while_block
puts "compiling while condition #{condition}"