codetools: leave implementation,initialization,finalization nodes open, error handling will close them, bug #21831

git-svn-id: trunk@36977 -
This commit is contained in:
mattias 2012-04-22 19:11:43 +00:00
parent 79e5ef4d40
commit ad932b2c33
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;