Class: RLSL::Prism::IR::ArrayIndex

Inherits:
Node
  • Object
show all
Defined in:
lib/rlsl/prism/ir/expressions.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#type

Instance Method Summary collapse

Methods inherited from Node

#accept, visits

Constructor Details

#initialize(array, index, type = nil) ⇒ ArrayIndex

Returns a new instance of ArrayIndex.



188
189
190
191
192
193
# File 'lib/rlsl/prism/ir/expressions.rb', line 188

def initialize(array, index, type = nil)
  super()
  @array = array
  @index = index
  @type = type
end

Instance Attribute Details

#arrayObject (readonly)

Returns the value of attribute array.



184
185
186
# File 'lib/rlsl/prism/ir/expressions.rb', line 184

def array
  @array
end

#indexObject (readonly)

Returns the value of attribute index.



184
185
186
# File 'lib/rlsl/prism/ir/expressions.rb', line 184

def index
  @index
end