(parentCtx)
| 446 | } |
| 447 | |
| 448 | unrollRecursionContexts(parentCtx) { |
| 449 | this._precedenceStack.pop(); |
| 450 | this._ctx.stop = this._input.LT(-1); |
| 451 | const retCtx = this._ctx; // save current ctx (return value) |
| 452 | // unroll so _ctx is as it was before call to recursive method |
| 453 | const parseListeners = this.getParseListeners(); |
| 454 | if (parseListeners !== null && parseListeners.length > 0) { |
| 455 | while (this._ctx !== parentCtx) { |
| 456 | this.triggerExitRuleEvent(); |
| 457 | this._ctx = this._ctx.parentCtx; |
| 458 | } |
| 459 | } else { |
| 460 | this._ctx = parentCtx; |
| 461 | } |
| 462 | // hook into tree |
| 463 | retCtx.parentCtx = parentCtx; |
| 464 | if (this.buildParseTrees && parentCtx !== null) { |
| 465 | // add return ctx into invoking rule's tree |
| 466 | parentCtx.addChild(retCtx); |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | getInvokingContext(ruleIndex) { |
| 471 | let ctx = this._ctx; |
nothing calls this directly
no test coverage detected