Hierarchy

  • Error
    • SyntaxError

Constructors

Properties

expected: Expectation[]
found: undefined | null | string
location: LocationRange
message: string
name: string

Methods

  • With good sources, generates a feature-rich error message pointing to the error in the input.

    Parameters

    • sources: SourceText[]

      List of {source, text} objects that map to the input.

    Returns string

  • Constructs the human-readable message from the machine representation.

    Parameters

    • expected: Expectation[]

      Array of expected items, generated by the parser

    • Optionalfound: null | string

      Any text that will appear as found in the input instead of expected

    Returns string