Class: Yadriggy::ConstPathField

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

Overview

Constant path reference as a L-value.

Instance Attribute Summary

Attributes inherited from ConstPathRef

#name, #scope

Attributes inherited from ASTnode

#parent, #usertype

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ConstPathRef

#const_value, #const_value_in_class, #value, #value_in_class

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) ⇒ ConstPathField

Returns a new instance of ConstPathField.



590
591
592
# File 'lib/yadriggy/ast.rb', line 590

def initialize(sexp)
  super
end

Class Method Details

.tagsObject



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

def self.tags() [:const_path_field, :top_const_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.



597
598
599
# File 'lib/yadriggy/ast.rb', line 597

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