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