Class: Rubycc::Front::AST::IncDec

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

Overview

Prefix or postfix "++"/"--". op is :add for "++" and :sub for "--". prefix is true for "++x"/"--x" and false for "x++"/"x--". target is a VariableRef, a Subscript or a dereference, exactly like CompoundAssignment.

Instance Attribute Summary collapse

Instance Attribute Details

#opObject (readonly)

Returns the value of attribute op

Returns:

  • (Object)

    the current value of op



67
68
69
# File 'lib/rubycc/front/ast.rb', line 67

def op
  @op
end

#prefixObject (readonly)

Returns the value of attribute prefix

Returns:

  • (Object)

    the current value of prefix



67
68
69
# File 'lib/rubycc/front/ast.rb', line 67

def prefix
  @prefix
end

#targetObject (readonly)

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



67
68
69
# File 'lib/rubycc/front/ast.rb', line 67

def target
  @target
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



67
68
69
# File 'lib/rubycc/front/ast.rb', line 67

def token
  @token
end