Class: SCASM::Statement

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

Direct Known Subclasses

Data, Instruction, Label

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addrObject

Returns the value of attribute addr.



6
7
8
# File 'lib/scasm/statement.rb', line 6

def addr
  @addr
end

Instance Method Details

#assemble(io) ⇒ Object



8
9
10
# File 'lib/scasm/statement.rb', line 8

def assemble io
  fail 'unimplemented'
end

#lengthObject

XXX HACK



17
18
19
20
21
# File 'lib/scasm/statement.rb', line 17

def length
  io = StringIO.new
  assemble io
  io.length/2
end

#to_sObject



12
13
14
# File 'lib/scasm/statement.rb', line 12

def to_s
  fail 'unimplemented'
end