Method: ANTLR3::AST::Tree#root
- Defined in:
- lib/antlr3/tree.rb
#root ⇒ Object
240 241 242 243 244 245 246 247 |
# File 'lib/antlr3/tree.rb', line 240 def root cursor = self until cursor.root? yield( parent_node = cursor.parent ) cursor = parent_node end return( cursor ) end |