Class: Nodewrap::ByteDecoder::Expression::Assignment

Inherits:
Nodewrap::ByteDecoder::Expression show all
Defined in:
lib/bytedecoder.rb

Instance Attribute Summary collapse

Attributes inherited from Nodewrap::ByteDecoder::Expression

#pc

Instance Method Summary collapse

Methods inherited from Nodewrap::ByteDecoder::Expression

#<=>, #fmt

Constructor Details

#initialize(pc, name, rhs) ⇒ Assignment

Returns a new instance of Assignment.



388
389
390
391
392
# File 'lib/bytedecoder.rb', line 388

def initialize(pc, name, rhs)
  super(pc)
  @name = name
  @rhs = rhs
end

Instance Attribute Details

#rhsObject (readonly)

Returns the value of attribute rhs.



386
387
388
# File 'lib/bytedecoder.rb', line 386

def rhs
  @rhs
end

Instance Method Details

#precedenceObject



398
399
400
# File 'lib/bytedecoder.rb', line 398

def precedence
  return 5
end

#to_sObject



394
395
396
# File 'lib/bytedecoder.rb', line 394

def to_s
  return "#{@name} = #{@rhs}"
end