parent
ed11a1ca8f
commit
505a537c09
|
|
@ -481,7 +481,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end
|
end
|
||||||
if pos(vi,jsfh) then
|
if pos(vi,jsfh) then
|
||||||
begin
|
begin
|
||||||
SetJsToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetJsToken(tokens,ttk,idx-1);
|
||||||
end
|
end
|
||||||
if vi="[" then
|
if vi="[" then
|
||||||
begin
|
begin
|
||||||
|
|
@ -593,7 +594,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end
|
end
|
||||||
idx++;
|
idx++;
|
||||||
end
|
end
|
||||||
SetJsToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetJsToken(tokens,ttk,idx-1);
|
||||||
end else
|
end else
|
||||||
if cst="'" or cst='"' then
|
if cst="'" or cst='"' then
|
||||||
begin
|
begin
|
||||||
|
|
@ -668,7 +670,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if FSynBranch="tsl" and vi="?" then
|
if FSynBranch="tsl" and vi="?" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
if idx<e and s[idx+1]=">" then
|
if idx<e and s[idx+1]=">" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,"?>",idx+1);
|
SetTToken(tokens,"?>",idx+1);
|
||||||
|
|
@ -685,7 +688,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi ="'" then
|
if vi ="'" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
SetTToken(tokens,"'",idx,"'");
|
SetTToken(tokens,"'",idx,"'");
|
||||||
if idx=e then return "'";
|
if idx=e then return "'";
|
||||||
r := FindRightChar("'",s,idx+1,e,"\\");
|
r := FindRightChar("'",s,idx+1,e,"\\");
|
||||||
|
|
@ -707,7 +711,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi = '"' then
|
if vi = '"' then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
SetTToken(tokens,'"',idx,'"');
|
SetTToken(tokens,'"',idx,'"');
|
||||||
if idx=e then return '"';
|
if idx=e then return '"';
|
||||||
r := FindRightChar('"',s,idx+1,e,"\\");
|
r := FindRightChar('"',s,idx+1,e,"\\");
|
||||||
|
|
@ -729,13 +734,15 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi="{" then
|
if vi="{" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
SetTToken(tokens,'{',idx,'{');
|
SetTToken(tokens,'{',idx,'{');
|
||||||
return ParserTokenLines(s,idx+1,e,'{',tokens);
|
return ParserTokenLines(s,idx+1,e,'{',tokens);
|
||||||
end else
|
end else
|
||||||
if vi="/" then
|
if vi="/" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
if idx=e then
|
if idx=e then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,vi,idx);
|
SetTToken(tokens,vi,idx);
|
||||||
|
|
@ -753,7 +760,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi="#" then
|
if vi="#" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
if idx=e then
|
if idx=e then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,vi,idx);
|
SetTToken(tokens,vi,idx);
|
||||||
|
|
@ -771,7 +779,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi="(" then
|
if vi="(" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
if idx=e then
|
if idx=e then
|
||||||
begin
|
begin
|
||||||
FCBBState.GetLeft();
|
FCBBState.GetLeft();
|
||||||
|
|
@ -792,7 +801,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi="%" then
|
if vi="%" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
idx++;
|
idx++;
|
||||||
if idx<=e then
|
if idx<=e then
|
||||||
begin
|
begin
|
||||||
|
|
@ -832,7 +842,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if vi="<" then
|
if vi="<" then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
if (idx+6<=e) and s[idx+1]="?" and lowercase(s[idx+2:idx+6])="tslx>" then
|
if (idx+6<=e) and s[idx+1]="?" and lowercase(s[idx+2:idx+6])="tslx>" then
|
||||||
begin
|
begin
|
||||||
d := SetTToken(tokens,s[idx:idx+6],idx+6);
|
d := SetTToken(tokens,s[idx:idx+6],idx+6);
|
||||||
|
|
@ -852,7 +863,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end else
|
end else
|
||||||
if pos(vi,"`~@#$^&*)+-;,.?:[]|\\=><%/") then
|
if pos(vi,"`~@#$^&*)+-;,.?:[]|\\=><%/") then
|
||||||
begin
|
begin
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
if vi=")" then
|
if vi=")" then
|
||||||
begin
|
begin
|
||||||
FCBBState.GetRight();
|
FCBBState.GetRight();
|
||||||
|
|
@ -878,7 +890,8 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
||||||
end
|
end
|
||||||
idx++;
|
idx++;
|
||||||
end
|
end
|
||||||
SetTToken(tokens,ttk,idx-1);
|
if ttk then
|
||||||
|
SetTToken(tokens,ttk,idx-1);
|
||||||
end else
|
end else
|
||||||
if cst="'" or cst='"' then
|
if cst="'" or cst='"' then
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue