[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)

TParser.TokenString

Returns the current token as a string.

Declaration

Source position: classesh.inc line 1672

public function TParser.TokenString: string;

Description

If current token type is toString or toWString, this method returns the contents of the string. That is, enclosing quotes are removed, embedded quotes are unescaped and control strings are converted to the appropriate sequence of characters.

If current token type isn't a string, a string containing the token representation in the input stream is returned, without any conversion: hexadecimal integers are returned with the leading $, and floating point suffixes like s, c or d are kept. For tokens whose type isn't a special type, return value of TokenString equals Token.

Remark:

If Token is toWString, TokenWideString should be used instead.

Errors

None.

See also

TParser.NextToken

  

Reads the next token and returns its type.

TParser.TokenWideString

  

Returns the current token as a widestring

TParser.Token

  

The type of the current token.

toString

  

Value returned by TParser.Token when a string was found in the input stream.

toWString

  

Value returned by TParser.Token when a widestring was found in the input stream.


Documentation generated on: Jun 23 2021