more complex while test

that works, but does leave one wondering what is tested apart from the
result (1)
This commit is contained in:
Torsten Ruger
2018-04-20 19:38:33 +03:00
parent 6a8bb90704
commit 020bce740a
2 changed files with 63 additions and 0 deletions

View File

@ -14,6 +14,10 @@ module Mom
raise "condition must be slot_definition #{condition}" unless condition.is_a?(SlotDefinition)
end
def to_s
"TruthCheck #{@condition} -> #{false_jump}"
end
def to_risc(compiler)
false_label = @false_jump.to_risc(compiler)
left = @condition.to_register(compiler,self)