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

TParser.TokenComponentIdent

Returns the path of a subcomponent starting from the current token.

Declaration

Source position: classesh.inc line 1667

public function TParser.TokenComponentIdent: string;

Description

If current token is toSymbol, TokenComponentIdent tries to find subcomponent names separated by a dot (.). The returned string is the longest subcomponent path found. If there are no subcomponents, current symbol is returned.

Remark:

After this method has been called, subsequent calls to TokenString or TokenWideString return the same value returned by TokenComponentIdent.

Example

If source stream contains a.b.c and TParser is positioned on the first token (a), this method returns a.b.c.

Errors

If Token isn't toSymbol, or no valid symbol is found after a dot, an EParserError exception is raised.

See also

TParser.NextToken

  

Reads the next token and returns its type.

TParser.Token

  

The type of the current token.

TParser.TokenString

  

Returns the current token as a string.

TParser.TokenWideString

  

Returns the current token as a widestring

toSymbol

  

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


Documentation generated on: Jun 22 2020