enterRule method

void enterRule(
  1. ParserRuleContext localctx,
  2. int state,
  3. int ruleIndex
)
inherited

Always called by generated parsers upon entry to a rule. Access field {@link #_ctx} get the current context.

Implementation

void enterRule(ParserRuleContext localctx, int state, int ruleIndex) {
  this.state = state;
  context = localctx;
  context!.start = _input.LT(1)!;
  if (buildParseTree) addContextToParseTree();
  if (_parseListeners != null) triggerEnterRuleEvent();
}