设计器

修正解析死循环问题
This commit is contained in:
JianjunLiu 2023-07-07 18:02:40 +08:00
parent 9b2ad753fc
commit 33f5e8a47d
3 changed files with 13 additions and 2 deletions

View File

@ -1000,6 +1000,7 @@ type TExecuteEditer=class(TCustomControl) //ִ
s := replacetext(s,"$(CURRENT_DIRECTORY)",dir);
s := replacetext(s,"$(SEARCH_PATH)",owner.getlibpathstr());
s := replacetext(s,"$(TSL_EXE)",gettslexe());
len := length(s);
return s;
end
function doSaveCurrentName();

View File

@ -39,7 +39,7 @@ type tslparser = class(tslparserbase) //
end
function tkopok();
begin
return FCurrentPos>0 and FCurrentPos<FTokenLen;
return FCurrentPos>=0 and FCurrentPos<FTokenLen;
end
function getTokenPos(ps);
begin
@ -52,7 +52,7 @@ type tslparser = class(tslparserbase) //
function ctoken(tk,tp,pos,r);
begin
if not FTokens then return 0;
r := tkopok(pos);
//r := tkopok(pos);
tk := FTokens[FCurrentPos,0];
tp := FTokens[FCurrentPos,1];
pos := FTokens[FCurrentPos,2]+1;
@ -398,6 +398,12 @@ type tslparser = class(tslparserbase) //
while true do
begin
ctoken(tk,tp,pos);
if ifnil(tk) then break;
if tk="end" and tp=TT_IDE then
begin
bpos();
break;
end
if tk=";" then
begin
if rcount then

View File

@ -454,6 +454,10 @@ type tcustompagecontrol = class(TCustomControl)
if FCurrentid=-1 then
begin
setselidx(0);
end else
begin
if not (page is class(TWinControl)) then CalcTabs();
InvalidateRect(nil,false);
end
end
public