Class TToken
Unit
Declaration
type TToken = class(TObject)
Description
Stores the exact type and additional information on one token.
Source: source/component/PasDoc_Tokenizer.pas (line 241).
Hierarchy
- TObject
- TToken
Overview
Fields
| Public | Data: string; |
| Public | MyType: TTokenType; |
| Public | Info: record |
| Public | CommentContent: string; |
| Public | StringContent: string; |
Methods
| Public | constructor Create(const TT: TTokenType); |
| Public | function GetTypeName: string; |
| Public | function IsSymbol(const ASymbolType: TSymbolType): Boolean; |
| Public | function IsKeyWord(const AKeyWord: TKeyWord): Boolean; |
| Public | function IsStandardDirective( const AStandardDirective: TStandardDirective): Boolean; |
| Public | function Description: string; |
Properties
| Public | property StreamName: string read FStreamName; |
| Public | property StreamAbsoluteFileName: string read FStreamAbsoluteFileName; |
| Public | property BeginPosition: Int64 read FBeginPosition; |
| Public | property EndPosition: Int64 read FEndPosition; |
| Public | property Line: Integer read FLine; |
Description
Fields
| Public | Data: string; |
|
the exact character representation of this token as it was found in the input file | |
| Public | MyType: TTokenType; |
|
the type of this token as TTokenType | |
| Public | Info: record |
|
additional information on this token as a variant record depending on the token's MyType | |
| Public | CommentContent: string; |
|
Contents of a comment token. This is defined only when MyType is in TokenCommentTypes or is TOK_DIRECTIVE. This is the text within the comment without comment delimiters. For TOK_DIRECTIVE you can safely assume that CommentContent[1] = '$'. | |
| Public | StringContent: string; |
|
Contents of the string token, that is: the value of the string literal. D only when MyType is TOK_STRING. | |
Methods
| Public | constructor Create(const TT: TTokenType); |
|
Create a token of and assign the argument token type to MyType | |
| Public | function GetTypeName: string; |
|
This item has no description. | |
| Public | function IsSymbol(const ASymbolType: TSymbolType): Boolean; |
|
Does MyType is TOK_SYMBOL and Info.SymbolType is ASymbolType ? | |
| Public | function IsKeyWord(const AKeyWord: TKeyWord): Boolean; |
|
Does MyType is TOK_KEYWORD and Info.KeyWord is AKeyWord ? | |
| Public | function IsStandardDirective( const AStandardDirective: TStandardDirective): Boolean; |
|
Does MyType is TOK_IDENTIFIER and Info.StandardDirective is AStandardDirective ? | |
| Public | function Description: string; |
|
Few words long description of this token. Describes MyType and Data (for those tokens that tend to have short Data). Starts with lower letter. | |
Properties
| Public | property StreamName: string read FStreamName; |
|
Informative to user name of the stream from which this token was read. This can be a filename (relative or absolute, however user specified it), but it also can be something arbitrary like "$if / $elseif condition". So don't treat it like a reliable filename. It is currently used to set TRawDescriptionInfo.StreamName. | |
| Public | property StreamAbsoluteFileName: string read FStreamAbsoluteFileName; |
|
Filename, always absolute, of the underlying file of this stream. Empty ('') if this is not a file stream. | |
| Public | property BeginPosition: Int64 read FBeginPosition; |
|
| |
| Public | property EndPosition: Int64 read FEndPosition; |
|
| |
| Public | property Line: Integer read FLine; |
|
Line number (1-based) in the stream where this token starts. | |
Generated by PasDoc 0.17.0.snapshot.