编辑器

统一语法高亮颜色
This commit is contained in:
JianjunLiu 2023-04-11 15:12:41 +08:00
parent 06c5a3f1d5
commit d8b6e56c3c
1 changed files with 25 additions and 10 deletions

View File

@ -761,9 +761,12 @@ type TTslSynHighLighter = class(TSynHighLighter)
end else end else
if {pos(vi,jsfh)}isjsfh then if {pos(vi,jsfh)}isjsfh then
begin begin
td := SetJsToken(tokens,vi,idx); if vi<>" " or vi="\t" then
if td and hightercolor then begin
td.FFcolor := hightercolor.symcolor() td := SetJsToken(tokens,vi,idx);
if td and hightercolor then
td.FFcolor := hightercolor.symcolor() ;
end
end else end else
begin begin
ttk+=vi; ttk+=vi;
@ -1352,33 +1355,45 @@ type TBatSynHigLighter = class(TSynHighLighter)
case lvv of case lvv of
"rem": "rem":
begin begin
v.FFColor := 0x80CD43; if hightercolor then v.FFcolor := hightercolor.commentcolor();
else
v.FFColor := 0x80CD43;
rem := true; rem := true;
end end
"if","else","echo","for","in","dir","cmd": "if","else","echo","for","in","dir","cmd","pause","not":
begin begin
v.FFColor := 0xFF0000; if hightercolor then v.FFcolor := hightercolor.keycolor();
else
v.FFColor := 0xFF0000;
end end
"@","~","#","%","&","*","=": "@","~","#","%","&","*","=":
begin begin
v.FFColor := 0x0000FF; if hightercolor then v.FFcolor := hightercolor.symcolor();
else
v.FFColor := 0x0000FF;
end else end else
begin begin
if i=0 then if i=0 then
begin begin
if pos("::",lvv) then if pos("::",lvv) then
begin begin
v.FFColor := 0x80CD43; if hightercolor then v.FFcolor := hightercolor.commentcolor();
else
v.FFColor := 0x80CD43;
rem := true; rem := true;
end else end else
begin begin
v.FFColor := 0xFF9900;// #0099FF if hightercolor then v.FFcolor := hightercolor.fontcolor();
else
v.FFColor := 0xFF9900;// #0099FF
end end
end else end else
begin begin
if pos("%",lvv) then if pos("%",lvv) then
begin begin
v.FFColor := 0xFF0000; if hightercolor then v.FFcolor := hightercolor.sysfunccolor();
else
v.FFColor := 0xFF0000;
end end
end end
end end