Class: Rubycc::Front::AST::ArrayDesignator

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

Overview

An array designator "[constant-expression]" (6.7.9). index is the bracketed constant folded to a Ruby Integer at parse time; token is the "[" for diagnostics (an out-of-range index).

Instance Attribute Summary collapse

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



118
119
120
# File 'lib/rubycc/front/ast.rb', line 118

def index
  @index
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



118
119
120
# File 'lib/rubycc/front/ast.rb', line 118

def token
  @token
end