Class: Haxor::Token::Label

Inherits:
Base
  • Object
show all
Defined in:
lib/haxor/token/label.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#absolute_addr

Instance Method Summary collapse

Constructor Details

#initialize(label) ⇒ Label

Returns a new instance of Label.



6
7
8
# File 'lib/haxor/token/label.rb', line 6

def initialize(label)
  @label = label
end

Instance Attribute Details

#label ⇒ Object (readonly)

Returns the value of attribute label.



4
5
6
# File 'lib/haxor/token/label.rb', line 4

def label
  @label
end

Instance Method Details

#size ⇒ Object



18
19
20
# File 'lib/haxor/token/label.rb', line 18

def size
  0
end

#to_bytecode ⇒ Object



10
11
12
# File 'lib/haxor/token/label.rb', line 10

def to_bytecode
  ''
end

#to_s ⇒ Object



14
15
16
# File 'lib/haxor/token/label.rb', line 14

def to_s
  "Label -> #{@label}"
end