Class: SCASM::Label

Inherits:
Statement show all
Defined in:
lib/scasm/statement.rb

Instance Attribute Summary collapse

Attributes inherited from Statement

#addr

Instance Method Summary collapse

Methods inherited from Statement

#length

Constructor Details

#initialize(name) ⇒ Label

Returns a new instance of Label.



72
73
74
# File 'lib/scasm/statement.rb', line 72

def initialize name
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



70
71
72
# File 'lib/scasm/statement.rb', line 70

def name
  @name
end

Instance Method Details

#assemble(io) ⇒ Object



76
77
78
# File 'lib/scasm/statement.rb', line 76

def assemble io
  # nop
end

#to_sObject



80
81
82
# File 'lib/scasm/statement.rb', line 80

def to_s
  "label #{@name.inspect}"
end