Unexpected is thrown by Parser.serror, which is invoked when an inner token matching fails.

Unlike NoMatch, this exception denotes that the stream is in an irrecoverable state because tokens have been consumed.

Constructor

new (token:Token, pos:Position)

Creates a new instance of Unexpected.

Variables

token:Token

The token which was found.

Methods

toString ():String

Returns a readable representation of this exception.

Inherited Variables

Defined by ParserError

read onlypos:Position

The position in the input where this exception occured.

Inherited Methods