rubyx/lib/register/instructions/branch.rb
Torsten Ruger 53d8f4b163 add source to instruction
for debug
2015-07-18 11:21:49 +03:00

20 lines
286 B
Ruby

module Register
# a branch must branch to a block.
class Branch < Instruction
def initialize source , to
super(source)
raise "No block" unless to
@block = to
end
attr_reader :block
def to_s
"Branch(to: #{block.name})"
end
end
end