Class: Haxor::Token::Pointer

Inherits:
Int64 show all
Defined in:
lib/haxor/token/pointer.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#absolute_addr

Instance Method Summary collapse

Methods inherited from Int64

#size, #to_bytecode, #to_s

Methods inherited from Data

#size, #to_s

Constructor Details

#initialize(label) ⇒ Pointer

Returns a new instance of Pointer.



7
8
9
10
# File 'lib/haxor/token/pointer.rb', line 7

def initialize(label)
  super(-1) # invalid pointer
  @label = label
end

Instance Attribute Details

#data ⇒ Object

Returns the value of attribute data.



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

def data
  @data
end

#label ⇒ Object (readonly)

Returns the value of attribute label.



5
6
7
# File 'lib/haxor/token/pointer.rb', line 5

def label
  @label
end