ExpressionNumberState

Implements an Expression-specific number state object.

Extends: GenericNumberState

Description

The ExpressionNumberState implements an expression-specific number state object.

Fields

PLUS

Represents a ‘+’ symbol.

protected PLUS: number = ‘+'.charCodeAt(0)

EXP1

Represents an ‘e’ symbol.

protected EXP1: number = ‘e’.charCodeAt(0)

EXP2

Represents an ‘E’ symbol.

protected EXP2: number = ‘E’.charCodeAt(0)

Instance methods

nextToken

Gets the next token from the stream started from the character linked to this state.

public nextToken(scanner: IScanner, tokenizer: ITokenizer): Token

  • scanner: IScanner - textual string to be tokenized.
  • tokenizer: ITokenizer - tokenizer class that controls the process.
  • returns: Token - next token from the top of the stream.