codetools: fixed parsing #0, bug #23906

git-svn-id: trunk@40335 -
This commit is contained in:
mattias 2013-02-17 10:33:37 +00:00
parent 1819f5cd3a
commit 0daa193e70

View File

@ -1126,7 +1126,7 @@ var
MacroID: LongInt; MacroID: LongInt;
p: PChar; p: PChar;
begin begin
//DebugLn([' TLinkScanner.ReadNextToken SrcPos=',SrcPos,' SrcLen=',SrcLen,' "',copy(Src,SrcPos,5),'"']); //DebugLn([' TLinkScanner.ReadNextToken SrcPos=',SrcPos,' SrcLen=',SrcLen,' "',dbgstr(Src,SrcPos,5),'"']);
{$IFOPT R+}{$DEFINE RangeChecking}{$ENDIF} {$IFOPT R+}{$DEFINE RangeChecking}{$ENDIF}
{$R-} {$R-}
if (SrcPos>SrcLen) and ReturnFromIncludeFileAndIsEnd then exit; if (SrcPos>SrcLen) and ReturnFromIncludeFileAndIsEnd then exit;
@ -1141,7 +1141,8 @@ begin
if (SrcPos>SrcLen) then begin if (SrcPos>SrcLen) then begin
if ReturnFromIncludeFileAndIsEnd then exit; if ReturnFromIncludeFileAndIsEnd then exit;
if (SrcPos>SrcLen) then break; if (SrcPos>SrcLen) then break;
end; end else
inc(SrcPos);
p:=@Src[SrcPos]; p:=@Src[SrcPos];
end; end;
'{' : '{' :
@ -1421,6 +1422,7 @@ begin
LastProgressPos:=CopiedSrcPos; LastProgressPos:=CopiedSrcPos;
DoCheckAbort; DoCheckAbort;
end; end;
//debugln(['TLinkScanner.Scan Token ',dbgstr(Src,TokenStart,SrcPos-TokenStart)]);
ReadNextToken; ReadNextToken;
if TokenType=lsttWord then if TokenType=lsttWord then
ParseKeyWord(TokenStart,SrcPos-TokenStart,LastTokenType); ParseKeyWord(TokenStart,SrcPos-TokenStart,LastTokenType);