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:
@ -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 ,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user