WhereParserExtension<R> extension
Methods
-
where(Predicate<R> predicate, {String? message, FailureFactory<R>? factory, Callback<R, String>? failureMessage, Callback<R, int>? failurePosition, FailureFactory<R>? failureFactory})
→ Parser<R>
-
Returns a parser that evaluates the
predicate
with the successful
parse result. If the predicate returns true
the parser proceeds with
the parse result, otherwise a parse failure is created using the
optionally specified factory
callback, the provided message
, or
otherwise an automatically created error message.