Class: Koara::Ast::Node
- Inherits:
-
Object
- Object
- Koara::Ast::Node
- Defined in:
- lib/koara/ast/node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
9 10 11 |
# File 'lib/koara/ast/node.rb', line 9 def children @children end |
#parent ⇒ Object
Returns the value of attribute parent.
7 8 9 |
# File 'lib/koara/ast/node.rb', line 7 def parent @parent end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/koara/ast/node.rb', line 8 def value @value end |
Instance Method Details
#add(n, i) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/koara/ast/node.rb', line 11 def add(n, i) if @children.nil? @children = Array.new end @children[i] = n end |
#children_accept(renderer) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/koara/ast/node.rb', line 18 def children_accept(renderer) if !@children.nil? i = 0 while i < @children.length @children[i].accept(renderer) i += 1 end end end |