System.Classes.TParser.CheckToken
Delphi
procedure CheckToken(T: Char);
C++
void __fastcall CheckToken(System::WideChar T);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TParser |
Description
Checks if the current token in the file is a specific type.
Call CheckToken to check if the current token in the file is a specific type. If the token is not the specified type, then the EParserError exception is raised, otherwise, processing continues. You can respond to this error by specifying the OnError event.
You pass the token type in the T value, passing one of the following values :
T value | Meaning |
---|---|
toEOF |
End of file has been reached |
toFloat |
The next token is a floating (decimal) pointing value |
toInteger |
The next token is an integer value |
toString |
The next token is a text value |
toSymbol |
The next token is a symbol |
toWString |
The next token is a wide string value |