match<T> function
Expects to match a given pattern
. If it is not matched, you can provide a custom errorMessage
.
Implementation
Parser<T> match<T>(Pattern pattern,
{String? errorMessage, SyntaxErrorSeverity? severity}) =>
_Match<T>(pattern, errorMessage, severity ?? SyntaxErrorSeverity.error);