pub fn backtrack_err<Input, Output, Error, ParseNext>(
parser: ParseNext,
) -> impl Parser<Input, Output, Error>where
Input: Stream,
Error: ParserError<Input> + ModalError,
ParseNext: Parser<Input, Output, Error>,
Expand description
Transforms an ErrMode::Cut
(unrecoverable) to ErrMode::Backtrack
(recoverable)
This attempts the parse, allowing other parsers to be tried on failure, like with
winnow::combinator::alt
.