Module: TreeStack::TreeElement
Overview
a class that includes NodeType is expected to have #push method to include child nodes, and a class that includes LeafType module is expected to have #concat method.
Instance Attribute Summary collapse
-
#depth ⇒ Object
Returns the value of attribute depth.
Instance Method Summary collapse
Instance Attribute Details
#depth ⇒ Object
Returns the value of attribute depth.
12 13 14 |
# File 'lib/pseudohiki/treestack.rb', line 12 def depth @depth end |
Instance Method Details
#accept(visitor, memo = nil) ⇒ Object
14 15 16 |
# File 'lib/pseudohiki/treestack.rb', line 14 def accept(visitor, memo=nil) visitor.visit(self, memo) end |