check method

Parser<T> check(
  1. Matcher matcher,
  2. {String errorMessage,
  3. SyntaxErrorSeverity severity}
)

Validates the parse result against a Matcher.

You can provide a custom errorMessage.

Implementation

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