Lines Matching refs:ctx
70 protected $ctx;
136 $this->ctx = null;
583 * {@see Parser::$ctx} get the current context.
588 $this->ctx = $localctx;
615 $this->ctx = $parent;
623 // if we have new localctx, make sure we replace existing ctx
625 if ($this->buildParseTree && $this->ctx !== $localctx) {
635 $this->ctx = $localctx;
653 $this->ctx = $localctx;
671 $this->ctx = $localctx;
686 $retctx = $this->context(); // save current ctx (return value)
691 while ($this->ctx !== $parentctx) {
699 $this->ctx = $parent;
702 $this->ctx = $parentctx;
709 // add return ctx into invoking rule's tree
716 $p = $this->ctx;
730 return $this->ctx;
735 if ($this->ctx === null) {
739 return $this->ctx;
747 public function setContext(ParserRuleContext $ctx) : void
749 $this->ctx = $ctx;
781 /** @var ParserRuleContext $ctx */
782 $ctx = $this->ctx;
794 while ($ctx !== null && $ctx->invokingState >= 0 && $following->contains(Token::EPSILON)) {
796 $invokingState = $atn->states[$ctx->invokingState];
806 $ctx = $ctx->getParent();
856 $p = $p ?? $this->ctx;