add operator to builder

just minus for now, easily extended
This commit is contained in:
Torsten Ruger
2018-04-08 01:01:24 +03:00
parent 5d4b9d4834
commit c30e461385
3 changed files with 15 additions and 2 deletions

View File

@ -90,5 +90,11 @@ module Risc
assert_equal Branch , ret.class
assert_equal @label , ret.label
end
def test_minus
op = @builder.build {space - typed_method}
assert_equal OperatorInstruction , op.class
assert_equal :- , op.operator
assert_equal :Space , op.left.type
end
end
end