ExpressionQuoteState

Implements an Expression-specific quote string state object.

Implements: IQuoteState

Description

The ExpressionQuoteState class implements an Expression-specific quote string state object.

Fields

QUOTE

Represents a " symbol.

protected QUOTE: number = ‘"'.charCodeAt(0);

Instance methods

decodeString

Decodes a string value.

public decodeString(value: string, quoteSymbol: number): string

  • value: string - A string value to be decoded.
  • quoteSymbol: number - A string quote character.
  • returns: string - An decoded string.

encodeString

Encodes a string value.

public encodeString(value: string, quoteSymbol: number): string

  • value: string - A string value to be encoded.
  • quoteSymbol: number - A string quote character.
  • returns: string - An encoded string.

nextToken

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

public nextToken(scanner: IScanner, tokenizer: ITokenizer): Token

  • scanner: IScanner - textual string to be tokenized.
  • tokenizer: ITokenizer - tokenizer class that controls the process.
  • returns: Token - next token from the top of the stream.