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

    Interface ParseObserver

    Implement this interface to receive parse events from an ObservableRDParser.

    interface ParseObserver {
        onEnterProduction(production: string, position: number): void;
        onError(message: string, position: number): void;
        onExitProduction(
            production: string,
            position: number,
            matched: boolean,
        ): void;
    }

    Implemented by

    Index

    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