Class: Yadriggy::Dots
Overview
Range.
Instance Attribute Summary
Attributes inherited from Binary
Attributes inherited from ASTnode
Class Method Summary collapse
Instance Method Summary collapse
-
#accept(evaluator) ⇒ void
A method for Visitor pattern.
-
#initialize(sexp) ⇒ Dots
constructor
A new instance of Dots.
Methods inherited from Binary
#const_value, #const_value_in_class, tag, #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) ⇒ Dots
Returns a new instance of Dots.
684 685 686 687 688 689 690 |
# File 'lib/yadriggy/ast.rb', line 684 def initialize(sexp) @left = to_node(sexp[1]) @op = if sexp[0] == :dot2 then :'..' else :'...' end @right = to_node(sexp[2]) add_child(@left) add_child(@right) end |
Class Method Details
.tags ⇒ Object
682 |
# File 'lib/yadriggy/ast.rb', line 682 def self.() [:dot2, :dot3] end |
Instance Method Details
#accept(evaluator) ⇒ void
This method returns an undefined value.
A method for Visitor pattern.
695 696 697 |
# File 'lib/yadriggy/ast.rb', line 695 def accept(evaluator) evaluator.dots(self) end |