petitparser.debug library
This package contains some simple debugging tools.
Classes
-
ContinuationParser<
T> - Continuation parser that when activated captures a continuation function and passes it together with the current context into the handler. [...]
Functions
-
profile(
Parser root, [ OutputHandler output = print ]) → Parser - Returns a transformed Parser that when being used measures the activation count and total time of each parser. [...]
-
progress(
Parser parser, [ OutputHandler output = print ]) → Parser -
Returns a transformed
parser
that when being used to read input visually prints its progress while progressing. [...] -
trace(
Parser parser, [ OutputHandler output = print ]) → Parser -
Returns a transformed
parser
that when being used to read input prints a trace of all activated parsers and their respective parse results. [...]
Typedefs
-
ContinuationCallback<
T> (Context context) → Result< T> - Callback function for the ContinuationHandler.
-
ContinuationHandler<
T> (ContinuationCallback< T> continuation, Context context) → Result<T> - Handler function for the ContinuationParser.