exitRule method

void exitRule()
inherited

Implementation

void exitRule() {
  assert(context != null);
  if (matchedEOF) {
    // if we have matched EOF, it cannot consume past EOF so we use LT(1) here
    context!.stop = _input.LT(1); // LT(1) will be end of file
  } else {
    context!.stop = _input.LT(-1); // stop node is what we just matched
  }
  // trigger event on _ctx, before it reverts to parent
  if (_parseListeners != null) triggerExitRuleEvent();
  state = context!.invokingState;
  context = context?.parent;
}