Hierarchy

Index

Constructors

constructor

Properties

a

a: number

approximateLineInfo

approximateLineInfo: boolean

If you are parsing a tree node stream, you will encounter som imaginary nodes w/o line/col info. We now search backwards looking for most recent token with line/col info, but notify getErrorHeader() that info is approximate.

b

b: number

charPositionInLine

charPositionInLine: number

The 0-based index into the line where the error occurred.

index

index: number

What is index of token/char were we looking at when the error occurred?

Optional innerException

innerException: Exception

input

input: IIntStream

What input stream did the error occur in?

line

line: number

Track the line (1-based) at which the error occurred in case this is generated from a lexer. We need to track this since the unexpected char doesn't carry the line info.

message

message: string

name

name: string

node

node: any

If this is a tree parser exception, node is set to the node with the problem.

Optional stack

stack: string

token

token: IToken

The current Token when an error occurred. Since not all streams can retrieve the ith Token, we have to track the Token object. For parsers. Even when it's a tree parser, token might be set.

Accessors

character

  • get character(): string
  • set character(value: string): void

lookahead

  • get lookahead(): number

unexpectedType

  • get unexpectedType(): number

Methods

Protected extractInformationFromTreeNodeStream

Protected extractInformationFromTreeNodeStream2

  • extractInformationFromTreeNodeStream2(input: ITreeNodeStream, k: number): void

toString

  • toString(): string
  • Returns string

Generated using TypeDoc