rubyx/lib/mom/instruction.rb

28 lines
526 B
Ruby
Raw Normal View History

module Mom
# Base class for MOM instructions
class Instruction
include Common::List
2017-09-06 11:11:30 +02:00
# implement flatten as noop to avoid condition
def flatten( options = {} )
return self
end
end
# A label with a name
class Label < Instruction
2017-08-30 16:21:13 +02:00
attr_reader :name
def initialize(name)
@name = name
end
end
end
require_relative "simple_call"
2017-08-30 16:21:13 +02:00
require_relative "truth_check"
require_relative "jump"
require_relative "slot_load"
require_relative "return_sequence"
require_relative "statement"