any<T> function
Parser<T>
any<T>(
- Iterable<
Parser< parsers, {T> > - bool backtrack = true,
- dynamic errorMessage,
- SyntaxErrorSeverity? severity,
Matches any one of the given parsers
.
If backtrack
is true
(default), a failed parse will not modify the scanner state.
You can provide a custom errorMessage
. You can set it to false
to not
generate any error at all.
Implementation
Parser<T> any<T>(Iterable<Parser<T>> parsers,
{bool backtrack = true, errorMessage, SyntaxErrorSeverity? severity}) {
return _Any(parsers, backtrack != false, errorMessage,
severity ?? SyntaxErrorSeverity.error);
}