Class: Juli::Absyn::ArrayNode
Direct Known Subclasses
Instance Attribute Summary collapse
-
#array ⇒ Object
Returns the value of attribute array.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #add(child) ⇒ Object
-
#initialize ⇒ ArrayNode
constructor
A new instance of ArrayNode.
Constructor Details
#initialize ⇒ ArrayNode
Returns a new instance of ArrayNode.
48 49 50 |
# File 'lib/juli/absyn.rb', line 48 def initialize @array = Array.new end |
Instance Attribute Details
#array ⇒ Object
Returns the value of attribute array.
46 47 48 |
# File 'lib/juli/absyn.rb', line 46 def array @array end |
Instance Method Details
#accept(visitor) ⇒ Object
52 53 54 |
# File 'lib/juli/absyn.rb', line 52 def accept(visitor) visitor.visit_array(self) end |
#add(child) ⇒ Object
56 57 58 59 60 |
# File 'lib/juli/absyn.rb', line 56 def add(child) @array << child child.parent = self self end |