TParser.TokenString

Returns the current token as a string.

Declaration

Source position: classesh.inc line 1827

public 
  function 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

Name Description
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.
TParser.NextToken Reads the next token and returns its type.
TParser.Token The type of the current token.
TParser.TokenWideString Returns the current token as a widestring