notifyErrorListeners method

void notifyErrorListeners(
  1. String msg, [
  2. Token? offendingToken,
  3. RecognitionException<IntStream>? e
])
inherited

Implementation

void notifyErrorListeners(
  String msg, [
  Token? offendingToken,
  RecognitionException? e,
]) {
  offendingToken = offendingToken ?? currentToken;
  _syntaxErrors++;
  int? line = -1;
  var charPositionInLine = -1;
  line = offendingToken.line;
  charPositionInLine = offendingToken.charPositionInLine;

  final listener = errorListenerDispatch;
  listener.syntaxError(
    this,
    offendingToken,
    line,
    charPositionInLine,
    msg,
    e,
  );
}