Class ParseError<E>

A class for parse error results.

An object of this type gets returned on parses that tried to match their target but failed. All parsers that produce errors return an error semantic value, which specifies the kind of error that occured.

See

Identifiable

Type Parameters

  • E extends Identifiable

    The type of the error semantic value, stored in error. It can vary based on the error semantics defined while parsing. It must implement Identifiable

Hierarchy

  • ParseError

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Type Parameters

    Parameters

    • target: string
    • index: number
    • result: string[]
    • error: E

    Returns ParseError<E>

Properties

error: E

The semantic error value produced in the parsing process.

index: number
isError: true = true
result: string[]
target: string

Accessors

Methods