What does TokenType mean?
Posted: 29.12.2020 22:34
After digged into the details of the source code, i realised this project is amazingly powerful.
I am confident that I understood most of the code i read, but currently i am stucked at the configuration file of the SyntAnalyzer.
Can you please help to explain the idea of TokenRule & BlockRule in the SyntAnalyzer?
e.g.
TokenRule properties:
FRegExpr: TecRegExpr;
FTokenType: Integer;
FOnMatchToken: TOnMatchToken;
FColumnTo: Integer;
FColumnFrom: Integer;
config in text:
item
DisplayName = 'Code block start'
StyleName = 'Code border'
TokenType = 9
Expression = '<\?(php)?'
ColumnFrom = 0
ColumnTo = 0
By matching the StyleName, i think the StyleName is used to links up with the StyleFormat. But I really dont understand the popuse of TokenType, ColumnFrom, ColumnTo.
Can you please help to elaborate? Thanks!
The BlockRule is more complex. and I am really trying to understand how it works. but failed to find any document/information about it. is it possible to create a wiki page for this 2 classes?
I am confident that I understood most of the code i read, but currently i am stucked at the configuration file of the SyntAnalyzer.
Can you please help to explain the idea of TokenRule & BlockRule in the SyntAnalyzer?
e.g.
TokenRule properties:
FRegExpr: TecRegExpr;
FTokenType: Integer;
FOnMatchToken: TOnMatchToken;
FColumnTo: Integer;
FColumnFrom: Integer;
config in text:
item
DisplayName = 'Code block start'
StyleName = 'Code border'
TokenType = 9
Expression = '<\?(php)?'
ColumnFrom = 0
ColumnTo = 0
By matching the StyleName, i think the StyleName is used to links up with the StyleFormat. But I really dont understand the popuse of TokenType, ColumnFrom, ColumnTo.
Can you please help to elaborate? Thanks!
The BlockRule is more complex. and I am really trying to understand how it works. but failed to find any document/information about it. is it possible to create a wiki page for this 2 classes?