mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 14:39:18 +02:00
SynEdit: Test Pascal-Highlighter, case-label for char/string with custom-word highlight
This commit is contained in:
parent
b135944c3b
commit
1fe9890ad6
@ -3441,6 +3441,17 @@ begin
|
||||
CheckTokensForLine('else foo;', 9, [tkKey, tkSpace, tkIdentifier, TK_Semi]);
|
||||
CheckTokensForLine('end;', 10, [tkKey, TK_Semi]);
|
||||
|
||||
PasHighLighter.CustomTokenCount := 1;
|
||||
PasHighLighter.CustomTokens[0].Markup.Foreground := 999;
|
||||
PasHighLighter.CustomTokens[0].MatchTokenKinds := [tkString];
|
||||
PasHighLighter.CustomTokens[0].Tokens.Add('''');
|
||||
CheckTokensForLine('''123'': foo;', 7,
|
||||
// 3 times string, one extra for each matchesd '
|
||||
[tkString+FCaseLabelAttri,tkString+FCaseLabelAttri,tkString+FCaseLabelAttri,
|
||||
TK_Colon, tkSpace, tkIdentifier, TK_Semi]);
|
||||
|
||||
|
||||
PasHighLighter.CustomTokenCount := 0;
|
||||
|
||||
FCaseLabelAttri.Clear;
|
||||
FCaseLabelAttri := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user