mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 14:59:11 +02:00
codetools: leave implementation,initialization,finalization nodes open, error handling will close them, bug #21831
git-svn-id: trunk@36977 -
This commit is contained in:
parent
79e5ef4d40
commit
ad932b2c33
@ -3082,11 +3082,13 @@ begin
|
||||
p:=CurPos.StartPos;
|
||||
if p>SrcLen then p:=SrcLen+1;
|
||||
while CurNode<>nil do begin
|
||||
//debugln(['TCustomCodeTool.CloseUnfinishedNodes BEFORE ',CurNode.DescAsString,' CurNode.EndPos=',CurNode.EndPos]);
|
||||
if CurNode.EndPos<1 then begin
|
||||
if CurNode.StartPos>p then p:=CurNode.StartPos;
|
||||
CurNode.EndPos:=p;
|
||||
end else if p<CurNode.EndPos then
|
||||
p:=CurNode.EndPos;
|
||||
//debugln(['TCustomCodeTool.CloseUnfinishedNodes AFTER ',CurNode.DescAsString,' CurNode.EndPos=',CleanPosToStr(CurNode.EndPos)]);
|
||||
CurNode:=CurNode.Parent;
|
||||
end;
|
||||
end;
|
||||
|
@ -2411,7 +2411,6 @@ begin
|
||||
// start implementation section node
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnImplementation;
|
||||
CurNode.EndPos:=CurPos.EndPos;
|
||||
CurSection:=ctnImplementation;
|
||||
|
||||
ScannedRange:=lsrImplementationStart;
|
||||
@ -2457,7 +2456,6 @@ begin
|
||||
CurNode.Desc:=ctnFinalization;
|
||||
ScannedRange:=lsrFinalizationStart;
|
||||
end;
|
||||
CurNode.EndPos:=CurPos.EndPos;
|
||||
CurSection:=CurNode.Desc;
|
||||
if ord(ScanTill)<=ord(ScannedRange) then exit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user