SymbolRootNode

This class is a special case of SymbolNode. A SymbolRootNode object has no symbol of its own, but has children that represent all possible symbols.

Implements: SymbolNode

Description

The SymbolRootNode class is a special case of SymbolNode. A SymbolRootNode object has no symbol of its own, but has children that represent all possible symbols.

Constructors

Creates and initializes a root node.

SymbolRootNode()

Instance methods

add

Adds the given string as a symbol.

add(value: str, token_type: TokenType)

  • value: str - character sequence to add.
  • token_type: TokenType - token type

next_token

Returns a symbol string from a scanner.

next_token(scanner: IScanner): Token

  • scanner: IScanner - scanner to read from
  • returns: Token - symbol string from a scanner