update reader

This commit is contained in:
Torsten Ruger
2014-06-26 11:34:48 +03:00
parent b9ddd75a33
commit 9d0d5aa431
3 changed files with 11 additions and 5 deletions

View File

@ -42,8 +42,14 @@ module Vm
# storage is a linked list. Has the same api as a ha
@bindings = List.new
end
# run the instruction stream given. Instructions are a graph and executing means traversing it.
# If there is no next instruction the machine stops
def run instruction
instruction.execute
while instruction do
next_instruction = instruction.next
instruction.execute
instruction = next_instruction
end
end
end
end