mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-24 04:39:29 +01:00
codetools: parse initialization with with statements
git-svn-id: trunk@34956 -
This commit is contained in:
parent
cd6db590b3
commit
98a0eef795
@ -2460,7 +2460,10 @@ begin
|
|||||||
repeat
|
repeat
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if (CurPos.StartPos>SrcLen) then break;
|
if (CurPos.StartPos>SrcLen) then break;
|
||||||
if (CurSection=ctnInitialization) and UpAtomIs('FINALIZATION') then
|
if CurPos.Flag=cafEND then begin
|
||||||
|
Result:=KeyWordFuncEndPoint;
|
||||||
|
break;
|
||||||
|
end else if (CurSection=ctnInitialization) and UpAtomIs('FINALIZATION') then
|
||||||
begin
|
begin
|
||||||
CurNode.EndPos:=CurPos.EndPos;
|
CurNode.EndPos:=CurPos.EndPos;
|
||||||
EndChildNode;
|
EndChildNode;
|
||||||
@ -2470,12 +2473,11 @@ begin
|
|||||||
CurSection:=CurNode.Desc;
|
CurSection:=CurNode.Desc;
|
||||||
ScannedRange:=lsrFinalizationStart;
|
ScannedRange:=lsrFinalizationStart;
|
||||||
if ord(ScanTill)<=ord(ScannedRange) then exit;
|
if ord(ScanTill)<=ord(ScannedRange) then exit;
|
||||||
end else if EndKeyWordFuncList.DoIdentifier(@Src[CurPos.StartPos]) then
|
end else if BlockStatementStartKeyWordFuncList.DoIdentifier(@Src[CurPos.StartPos])
|
||||||
begin
|
then begin
|
||||||
ReadTilBlockEnd(false,false);
|
if not ReadTilBlockEnd(false,true) then RaiseEndOfSourceExpected;
|
||||||
end else if CurPos.Flag=cafEND then begin
|
end else if UpAtomIs('WITH') then begin
|
||||||
Result:=KeyWordFuncEndPoint;
|
ReadWithStatement(true,true);
|
||||||
break;
|
|
||||||
end;
|
end;
|
||||||
until false;
|
until false;
|
||||||
Result:=true;
|
Result:=true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user