Method: Antlr4::Runtime::RuleContext#depth
- Defined in:
- lib/antlr4/runtime/rule_context.rb
#depth ⇒ Object
| 13 14 15 16 17 18 19 20 21 | # File 'lib/antlr4/runtime/rule_context.rb', line 13 def depth n = 0 p = self until p.nil? p = p.parent n += 1 end n end |