Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CsvWordState

Implements a word state to tokenize CSV stream.

Hierarchy

Implements

Index

Constructors

constructor

  • new CsvWordState(fieldSeparators: number[], quoteSymbols: number[]): CsvWordState
  • Constructs this object with specified parameters.

    Parameters

    • fieldSeparators: number[]

      Separators for fields in CSV stream.

    • quoteSymbols: number[]

      Delimiters character to quote strings.

    Returns CsvWordState

Methods

clearWordChars

  • clearWordChars(): void

nextToken

  • Ignore word (such as blanks and tabs), and return the tokenizer's next token.

    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.

setWordChars

  • setWordChars(fromSymbol: number, toSymbol: number, enable: boolean): void
  • Establish characters in the given range as valid characters for part of a word after the first character. Note that the tokenizer must determine which characters are valid as the beginning character of a word.

    Parameters

    • fromSymbol: number

      First character index of the interval.

    • toSymbol: number

      Last character index of the interval.

    • enable: boolean

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

    Returns void

Generated using TypeDoc