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
NewSymbolRootNode
Creates and initializes a root node.
NewSymbolRootNode() *SymbolRootNode
Methods
Add
Adds the given string as a symbol.
(c *SymbolRootNode) Add(value string, tokenType int)
- value: string - character sequence to add.
- tokenType: int - token type (TokenType)
nextToken
Returns a symbol string from a scanner.
(c *SymbolRootNode) NextToken(scanner io.IScanner) *Token