ExpressionQuoteState

Implements an Expression-specific quote string state object.

Implements: IQuoteState

Description

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

Constructors

NewExpressionQuoteState

Create new instance of ExpressionQouteState

NewExpressionQuoteState() *ExpressionQuoteState

Methods

DecodeString

Decodes a string value.

(c *ExpressionQuoteState) DecodeString(value string, quoteSymbol rune) string

  • value: string - string value to be decoded.
  • quoteSymbol: rune - string quote character.
  • returns: string - decoded string.

EncodeString

Encodes a string value.

(c *ExpressionQuoteState) EncodeString(value string, quoteSymbol rune) string

  • value: string - string value to be encoded.
  • quoteSymbol: rune - string quote character.
  • returns: string - encoded string.

NextToken

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

(c *ExpressionQuoteState) 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.