Class: Rubycc::Front::AST::CompoundAssignment

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/front/ast.rb

Overview

Compound assignment "target op= value". op is one of :add, :sub, :mul, :div, :mod (the operator without its trailing "="). target is a VariableRef, a Subscript or a dereference (Unary with op :deref); the parser rejects any other, non-assignable target.

Instance Attribute Summary collapse

Instance Attribute Details

#opObject (readonly)

Returns the value of attribute op

Returns:

  • (Object)

    the current value of op



61
62
63
# File 'lib/rubycc/front/ast.rb', line 61

def op
  @op
end

#targetObject (readonly)

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



61
62
63
# File 'lib/rubycc/front/ast.rb', line 61

def target
  @target
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



61
62
63
# File 'lib/rubycc/front/ast.rb', line 61

def token
  @token
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



61
62
63
# File 'lib/rubycc/front/ast.rb', line 61

def value
  @value
end