codetools: append node ctnEndPoint for programs

git-svn-id: trunk@29795 -
This commit is contained in:
mattias 2011-03-11 08:03:05 +00:00
parent eb4109ed4e
commit ac2f3730dc
2 changed files with 8 additions and 2 deletions

View File

@ -1656,7 +1656,7 @@ begin
// and no update is needed
if (ord(Range)>ord(ScannedRange)) and (not LastErrorIsValid) then begin
{$IFDEF VerboseUpdateNeeded}
DebugLn(['TLinkScanner.UpdateNeeded because range increased Range=',ord(Range),' ScannedRange=',ord(ScannedRange)]);
DebugLn(['TLinkScanner.UpdateNeeded because range increased from ',dbgs(ScannedRange),' to ',dbgs(Range)]);
{$ENDIF}
exit;
end;

View File

@ -3133,8 +3133,14 @@ begin
if (CurPos.Flag<>cafPoint) then
SaveRaiseException(ctsMissingPointAfterEnd);
// close program
CurNode.EndPos:=CurPos.EndPos;
CurNode.EndPos:=CurPos.StartPos;
EndChildNode;
// add endpoint node
CreateChildNode;
CurNode.Desc:=ctnEndPoint;
CurNode.EndPos:=CurPos.StartPos;
EndChildNode;
ScannedRange:=lsrEnd;
CurSection:=ctnNone;
end;
Result:=true;