编辑器

语法高亮
This commit is contained in:
JianjunLiu 2023-04-11 14:51:40 +08:00
parent c3e7ddbc9f
commit 06c5a3f1d5
1 changed files with 7 additions and 3 deletions

View File

@ -637,7 +637,7 @@ type TTslSynHighLighter = class(TSynHighLighter)
begin
idx := b;
ttk := "";
jsfh := " \t`~!#$%^&*()+[]{}|\\/?><.,=:";
jsfh := " \t`~!#$%^&*()+[]{}|\\/?><.,=:;";
if cst=0 then
begin
while idx<=e do
@ -651,8 +651,10 @@ type TTslSynHighLighter = class(TSynHighLighter)
SetJsToken(tokens,"<!--",idx+3,"/*");
return ParserTslxTokenLines(s,idx+4,e,"<!--",tokens);
end
isjsfh := false;
if pos(vi,jsfh) then
begin
isjsfh := true;
if ttk then
SetJsToken(tokens,ttk,idx-1);
end
@ -757,9 +759,11 @@ type TTslSynHighLighter = class(TSynHighLighter)
end
SetJsToken(tokens,vi,idx);
end else
if pos(vi,jsfh) then
if {pos(vi,jsfh)}isjsfh then
begin
SetJsToken(tokens,vi,idx);
td := SetJsToken(tokens,vi,idx);
if td and hightercolor then
td.FFcolor := hightercolor.symcolor()
end else
begin
ttk+=vi;