Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWhitespaceState

Defines an interface for tokenizer state that processes whitespaces (' ', '\t')

Hierarchy

Implemented by

Index

Methods

clearWhitespaceChars

  • clearWhitespaceChars(): void
  • Clears definitions of whitespace characters.

    Returns void

nextToken

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

    Parameters

    • scanner: IScanner

      A textual string to be tokenized.

    • tokenizer: ITokenizer

      A tokenizer class that controls the process.

    Returns Token

    The next token from the top of the stream.

setWhitespaceChars

  • setWhitespaceChars(fromSymbol: number, toSymbol: number, enable: boolean): void
  • Establish the given characters as whitespace to ignore.

    Parameters

    • fromSymbol: number

      First character index of the interval.

    • toSymbol: number

      Last character index of the interval.

    • enable: boolean

      true if this state should ignore characters in the given range.

    Returns void

Generated using TypeDoc