Prepares a failure object for a new failure
Prepares a failure object for a new failure
The failure object, usually retrieved from the ParseCtx to avoid allocation overhead
The index at which this failure occurred
Any parsers which failed at the current index. These
get noted in the error message if traceFailure
is
set. By default, this is the current parser.
Whether or not this failure should prevent backtracking
Prepares a failure object to continue an existing failure, e.
Prepares a failure object to continue an existing failure, e.g. if some sub-parser failed and you want to pass the failure up the stack.
The failure returned by the subparser
The index of the *current* parser
Any parsers which failed at the current index. These
get noted in the error message if traceFailure
is
set. By default, the existing traceParsers
from the
original failure are left unchanged
Whether or not this parser failing should prevent backtracking. ORed with any cuts caused by the existing failure
Prepares a success object to be returned.
Prepares a success object to be returned.
The existing success object, usually taken from ParseCtx to avoid allocation overhead.
The value that this parser succeeded with
The index of the parser *after* having successfully parsed part of the input
Any parsers which failed at the current index in the creation of this success. Even though this parser succeeded, failures inside sub-parsers must be reported to ensure proper error reporting.
Whether the parse crossed a cut and should prevent backtracking
Convenience methods to be used internally inside Parsers