rubyx/lib/asm/arm/generator_label.rb

26 lines
379 B
Ruby
Raw Normal View History

2014-04-16 11:02:28 +02:00
require "asm/label_object"
class Asm::Arm::GeneratorLabel < Asm::LabelObject
def initialize(asm)
@asm = asm
end
2014-04-21 20:38:39 +02:00
def at pos
@position = pos
end
def length
0
end
2014-04-16 11:02:28 +02:00
def set!
2014-04-22 21:24:22 +02:00
@asm.add_value self
self
2014-04-16 11:02:28 +02:00
end
end
class Asm::Arm::GeneratorExternLabel < Asm::LabelObject
def initialize(name)
@name = name
extern!
end
attr_reader :name
end