Class: Rubycc::Front::AST::Subscript

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

Overview

A subscript target[index] (postfix "[" expression "]"). Both target and index are expression nodes; the generator lowers it as "*(target + index)" and type-checks that target is an array/pointer.

Instance Attribute Summary collapse

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



130
131
132
# File 'lib/rubycc/front/ast.rb', line 130

def index
  @index
end

#targetObject (readonly)

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



130
131
132
# File 'lib/rubycc/front/ast.rb', line 130

def target
  @target
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



130
131
132
# File 'lib/rubycc/front/ast.rb', line 130

def token
  @token
end