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.

QUOTE: int = ord('"')

Instance methods

decode_string

Decodes a string value.

decode_string(value: str, quote_symbol: int): str

  • value: str - string value to be decoded.
  • quote_symbol: int - string quote character.
  • returns: str - decoded string.

encode_string

Encodes a string value.

encode_string(value: str, quote_symbol: int): str

  • value: str - string value to be encoded.
  • quote_symbol: int - string quote character.
  • returns: str - encoded string.

next_token

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

next_token(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.