error method

Parser<T> error(
  1. {String errorMessage,
  2. SyntaxErrorSeverity severity}
)

Binds an errorMessage to a copy of this parser.

Implementation

Parser<T> error({String errorMessage, SyntaxErrorSeverity severity}) =>
    new _Alt<T>(this, errorMessage, severity ?? SyntaxErrorSeverity.error);