update to new syntax and patch tests

basic semantics remain, but have to improve test for new functionality
that has to be written for new branch types
This commit is contained in:
Torsten Ruger
2015-10-19 15:31:48 +03:00
parent bdcd0f297d
commit 50379a1fea
8 changed files with 37 additions and 38 deletions

View File

@ -3,7 +3,7 @@ module Phisol
# if - attr_reader :cond, :if_true, :if_false
def on_if_statement statement
condition , if_true , if_false = *statement
branch_type , condition , if_true , if_false = *statement
condition = condition.first
# to execute the logic as the if states it, the blocks are the other way around
# so we can the jump over the else if true ,

View File

@ -3,7 +3,7 @@ module Phisol
def on_while_statement statement
#puts statement.inspect
condition , statements = *statement
branch_type , condition , statements = *statement
condition = condition.first
# this is where the while ends and both branches meet

View File

@ -98,7 +98,7 @@ module Register
next if objekt.is_a? Parfait::BinaryCode
write_any( objekt )
end
puts "Assembled #{stream_position} bytes"
#puts "Assembled #{stream_position} bytes"
return @stream.string
end