codetools: fixed range of FindCommentInFront

git-svn-id: trunk@26546 -
This commit is contained in:
mattias 2010-07-09 12:48:05 +00:00
parent 241b11f6b3
commit 54ce6e667b
2 changed files with 3 additions and 3 deletions

View File

@ -4215,6 +4215,7 @@ var
end;
// search comment in front of declaration
//debugln(['FindDeclarationNode search comment in front: ',DeclarationTool=Self,' SkipComments=',SkipComments,' Identifier=',Identifier]);
if (DeclarationTool=Self)
and (not SkipComments)
and FindCommentInFront(DeclarationNode.StartPos,Identifier,

View File

@ -2381,7 +2381,6 @@ var
end;
var
CleanCursorPos: integer;
ANode: TCodeTreeNode;
p: LongInt;
CommentLvl: Integer;
@ -2431,7 +2430,7 @@ begin
MoveCursorToCleanPos(ANode.StartPos);
end;
//debugln('TPascalReaderTool.FindCommentInFront B Area="',copy(Src,CurPos.StartPos,CleanCursorPos-CurPos.StartPos),'"');
//debugln('TPascalReaderTool.FindCommentInFront B Area="',copy(Src,CurPos.StartPos,StartPos-CurPos.StartPos),'"');
FoundStartPos:=-1;
repeat
@ -2501,7 +2500,7 @@ begin
end;
ReadNextAtom;
//DebugLn('TPascalReaderTool.FindCommentInFront NextAtom=',GetAtom);
until (CurPos.EndPos>=CleanCursorPos) or (CurPos.EndPos>=SrcLen);
until (CurPos.StartPos>=StartPos) or (CurPos.EndPos>=SrcLen);
Result:=(FoundStartPos>=1);
CommentStart:=FoundStartPos;