Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Failure

Represents a failed parse.

Hierarchy

  • Failure

Index

Constructors

constructor

  • new Failure(istream: CharStream, error_pos: number, error_msg?: string, is_critical?: boolean): Failure
  • Returns an object representing a failed parse. If the failure is critical, then parsing will stop immediately.

    Parameters

    • istream: CharStream

      The string, unmodified, that was given to the parser.

    • error_pos: number

      The position of the parsing failure in istream.

    • error_msg: string = ''

      The error message for the failure.

    • is_critical: boolean = false

      Whether or not the failure should cause an enclosing choice to fail (i.e., short-circuit).

    Returns Failure

Properties

error_msg

error_msg: string

error_pos

error_pos: number

inputstream

inputstream: CharStream

is_critical

is_critical: boolean

tag

tag: "failure" = 'failure'

Generated using TypeDoc