first steps to defining specialised slot classes

getting rid of the mess in SlotDefinition (wip)
This commit is contained in:
2020-02-10 18:12:39 +07:00
parent df4fd409c1
commit 24d7fe25da
35 changed files with 104 additions and 62 deletions

View File

@ -73,7 +73,7 @@ module SolBlocks
def test_assigns_move
@ins = compile_main_block( "@a = arg")
assert_equal SlotMachine::SlotLoad , @ins.class , @ins
assert_equal SlotMachine::SlotDefinition , @ins.right.class , @ins
assert_equal SlotMachine::MessageDefinition , @ins.right.class , @ins
end
end

View File

@ -12,7 +12,7 @@ module SolBlocks
assert_equal TruthCheck , @ins.next(3).class
end
def test_condition_is_slot
assert_equal SlotDefinition , @ins.next(3).condition.class , @ins
assert_equal MessageDefinition , @ins.next(3).condition.class , @ins
end
def test_simple_call
assert_equal SimpleCall , @ins.next(2).class

View File

@ -15,7 +15,7 @@ module SolBlocks
assert_equal TruthCheck , @ins.next.class , @ins
end
def test_condition_is_slot
assert_equal SlotDefinition , @ins.next.condition.class , @ins
assert_equal MessageDefinition , @ins.next.condition.class , @ins
end
def test_array
check_array [Label, TruthCheck, SlotLoad, Jump, Label,