Class: Yadriggy::ArrayRefField

Inherits:
ArrayRef show all
Defined in:
lib/yadriggy/ast.rb

Overview

Array reference as L-value.

Instance Attribute Summary

Attributes inherited from ArrayRef

#array, #indexes

Attributes inherited from ASTnode

#parent, #usertype

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AstHelper

#has_tag?, #to_node, #to_nodes

Methods inherited from ASTnode

#add_child, #add_children, #const_value, #const_value_in_class, #get_context_class, #get_receiver_object, #is_proc?, #pretty_print, #root, #source_location, #source_location_string, #value, #value_in_class

Constructor Details

#initialize(sexp) ⇒ ArrayRefField

Returns a new instance of ArrayRefField.



1045
1046
1047
# File 'lib/yadriggy/ast.rb', line 1045

def initialize(sexp)
  super sexp
end

Class Method Details

.tagObject



1043
# File 'lib/yadriggy/ast.rb', line 1043

def self.tag() :aref_field end

Instance Method Details

#accept(evaluator) ⇒ void

This method returns an undefined value.

A method for Visitor pattern.

Parameters:

  • evaluator (Eval)

    the visitor of Visitor pattern.



1052
1053
1054
# File 'lib/yadriggy/ast.rb', line 1052

def accept(evaluator)
  evaluator.array_ref_field(self)
end