Optionalsink: (line: string) => voidOptional line writer. Defaults to console.error.
Called when the parser enters a production method.
Name of the production rule.
Current position in the source.
Called when the parser throws a parse error.
The error message.
Current position at the time of failure.
Called when the parser exits a production method.
Name of the production rule.
Current position after the attempt.
Whether the production successfully matched input.
Formats parse events as an indented call tree and writes each line to a sink.
Defaults to writing to
console.error. Pass a custom sink to redirect output:Output example: