Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SymbolRootNode

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

Hierarchy

Index

Constructors

constructor

Accessors

tokenType

valid

  • get valid(): boolean
  • set valid(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

Methods

add

  • add(value: string, tokenType: TokenType): void
  • Add the given string as a symbol.

    Parameters

    • value: string

      The character sequence to add.

    • tokenType: TokenType

    Returns void

addDescendantLine

  • addDescendantLine(value: string, tokenType: TokenType): void
  • Add a line of descendants that represent the characters in the given string.

    Parameters

    Returns void

ancestry

  • ancestry(): string
  • Show the symbol this node represents.

    Returns string

    The symbol this node represents.

deepestRead

  • Find the descendant that takes as many characters as possible from the input.

    Parameters

    Returns SymbolNode

ensureChildWithChar

findChildWithChar

nextToken

  • Return a symbol string from a scanner.

    Parameters

    • scanner: IScanner

      A scanner to read from

    Returns Token

    A symbol string from a scanner

unreadToValid

  • Unwind to a valid node; this node is "valid" if its ancestry represents a complete symbol. If this node is not valid, put back the character and ask the parent to unwind.

    Parameters

    Returns SymbolNode

Generated using TypeDoc