2015-08-04 21:01:20 +02:00
|
|
|
module Register
|
|
|
|
|
|
|
|
class OperatorInstruction < Instruction
|
|
|
|
def initialize source , operator , left , right
|
|
|
|
super(source)
|
|
|
|
@operator = operator
|
|
|
|
@left = left
|
|
|
|
@right = right
|
|
|
|
end
|
2015-08-07 15:46:55 +02:00
|
|
|
attr_reader :operator, :left , :right
|
2015-08-04 21:01:20 +02:00
|
|
|
|
|
|
|
def to_s
|
|
|
|
"OperatorInstruction: #{left} #{operator} #{right}"
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|