parent
da625fd02b
commit
5fa81d43db
|
|
@ -1874,6 +1874,7 @@ type TEditer=class(TCustomcontrol) //
|
|||
FSynClasses["js"]:= array(class(TJsSynHighLighter),class(tjssyncompletion),";js;");
|
||||
FSynClasses["css"]:= array(class(TcssSynHighLighter),class(tcsssyncompletion),";css;");
|
||||
FSynClasses["xml"]:= array(class(TxmlSynHighLighter),class(tcsssyncompletion),";xml;");
|
||||
FSynClasses["html"]:= array(class(ThtmlSynHighLighter),class(tcsssyncompletion),";html;");
|
||||
FSynClasses["ini"]:= array(class(TINISynHigLighter),class(TSynCompletion),";ini;");
|
||||
FSynClasses["bat"]:= array(class(TBatSynHigLighter),class(TSynCompletion),";bat;cmd;");
|
||||
FSynClasses["tfm"]:= array(class(ttfmhighlighter),class(TSynCompletion),";tfm;");
|
||||
|
|
|
|||
|
|
@ -359,9 +359,23 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
fpairbegin;
|
||||
public
|
||||
hightercolor;
|
||||
fforcehtml;
|
||||
function forcehtml(h);
|
||||
begin
|
||||
if h then
|
||||
begin
|
||||
fforcehtml := true;
|
||||
FSynBranch := "tslx";
|
||||
end else
|
||||
begin
|
||||
fforcehtml := false;
|
||||
FSynBranch := 0;
|
||||
end
|
||||
end
|
||||
function Create(AOwner);
|
||||
begin
|
||||
inherited;
|
||||
fforcehtml := 0;
|
||||
fpairbegin := array("select":1,"sselect":1,"update":1,"mselect":1,"vselect":1,"try":1,"begin":1,"type":1,"case":1);
|
||||
FSynBranch := 0;// 0, "tsl" "tslx"
|
||||
Clean();
|
||||
|
|
@ -414,7 +428,11 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
// { ' " %% 0
|
||||
FTokens := array();
|
||||
FSates := array(0); //״̬
|
||||
FSynSates := array(0);
|
||||
if fforcehtml then
|
||||
begin
|
||||
FSynSates := array("tslx");
|
||||
end else
|
||||
FSynSates := array(0);
|
||||
FBBStates := array(new TBBState(")"));
|
||||
FBEStates := array(new TBBState("end"));
|
||||
FMBStates := array(new TBBState("]"));
|
||||
|
|
@ -703,7 +721,7 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
end else
|
||||
if vi="<" then
|
||||
begin
|
||||
if idx+4<=e and s[idx+1]="?" and lowercase(s[idx+2:idx+4])="tsl" then
|
||||
if not(fforcehtml) and idx+4<=e and s[idx+1]="?" and lowercase(s[idx+2:idx+4])="tsl" then
|
||||
begin
|
||||
if (idx+4=e) or(s[idx+5] in array(" ","\t")) then //½áβ
|
||||
begin
|
||||
|
|
@ -1265,6 +1283,15 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
FSynBranch;
|
||||
|
||||
end
|
||||
type ThtmlSynHighLighter = class(TTslSynHighLighter)
|
||||
function Create(AOwner);
|
||||
begin
|
||||
inherited;
|
||||
forcehtml(1);
|
||||
Clean();
|
||||
end
|
||||
|
||||
end
|
||||
type TBatSynHigLighter = class(TSynHighLighter)
|
||||
function Create(AOwner);
|
||||
begin
|
||||
|
|
|
|||
Loading…
Reference in New Issue