@configuredthings/rdp.js - v0.7.0
    Preparing search index...

    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:

    const lines: string[] = []
    const obs = new DebugObserver(line => lines.push(line))

    Output example:

    expr  pos:0
    term pos:0
    term matched pos:1
    expr matched pos:1

    Implements

    Index

    Constructors

    Methods

    • Called when the parser enters a production method.

      Parameters

      • production: string

        Name of the production rule.

      • position: number

        Current position in the source.

      Returns void

    • Called when the parser throws a parse error.

      Parameters

      • message: string

        The error message.

      • position: number

        Current position at the time of failure.

      Returns void

    • Called when the parser exits a production method.

      Parameters

      • production: string

        Name of the production rule.

      • position: number

        Current position after the attempt.

      • matched: boolean

        Whether the production successfully matched input.

      Returns void