From bdd8d247fb523a84d06d667550e626285088132c Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 18 Jan 2012 13:50:24 +0000 Subject: [PATCH] codetools: fixed TLinkScanner.SourceName git-svn-id: trunk@34776 - --- components/codetools/finddeclarationtool.pas | 2 +- components/codetools/linkscanner.pas | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 1c9787a7c4..00cbbdaa67 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -6358,7 +6358,7 @@ begin if (Tree.Root<>nil) and (not (fdfIgnoreUsedUnits in Params.Flags)) then begin HiddenUnits:=Scanner.GetHiddenUsedUnits; {$IFDEF ShowTriedContexts} - debugln(['TFindDeclarationTool.FindIdentifierInHiddenUsedUnits ',Scanner.MainFilename,' SourceName=',Scanner.SourceName,' HiddenUnits=',HiddenUnits]); + debugln(['TFindDeclarationTool.FindIdentifierInHiddenUsedUnits Identifier=',GetIdentifier(Params.Identifier),' ',Scanner.MainFilename,' SourceName=',Scanner.SourceName,' HiddenUnits=',HiddenUnits]); {$ENDIF} p:=length(HiddenUnits); while p>=1 do begin diff --git a/components/codetools/linkscanner.pas b/components/codetools/linkscanner.pas index ddc3df2999..4d0e6ccc33 100644 --- a/components/codetools/linkscanner.pas +++ b/components/codetools/linkscanner.pas @@ -3547,7 +3547,7 @@ begin if TokenType=lsttWord then begin if SourceName<>'' then SourceName:=SourceName+'.'; - SourceName:=SourceName+GetIdentifier(@Src[SrcPos]); + SourceName:=SourceName+GetIdentifier(@Src[TokenStart]); ReadNextToken; // read ';' or '.' or hint modifier end; until TokenType<>lsttPoint; @@ -3610,7 +3610,7 @@ end; function TLinkScanner.TokenIsWord(p: PChar): boolean; begin - Result:=(TokenType=lsttWord) and (CompareIdentifiers(p,@Src[SrcPos])=0); + Result:=(TokenType=lsttWord) and (CompareIdentifiers(p,@Src[TokenStart])=0); end; function TLinkScanner.DoImplementationToken: boolean;