codetools: fixed parsing forward class

git-svn-id: trunk@29347 -
This commit is contained in:
mattias 2011-02-03 10:28:09 +00:00
parent e187934649
commit 49c7f66c0f
2 changed files with 7 additions and 4 deletions

View File

@ -3739,6 +3739,7 @@ var
ContextDesc: Word;
IsForward: Boolean;
ClassDesc: TCodeTreeNodeDesc;
ClassNode: TCodeTreeNode;
begin
ContextDesc:=CurNode.Desc;
if not (ContextDesc in [ctnTypeDefinition,ctnGenericType,
@ -3766,6 +3767,7 @@ begin
else
RaiseStringExpectedButAtomFound('class');
CreateChildNode;
ClassNode:=CurNode;
CurNode.Desc:=ClassDesc;
CurNode.StartPos:=ClassAtomPos.StartPos;
IsForward:=true;
@ -3829,6 +3831,7 @@ begin
begin
if IsForward then begin
// forward class definition found
ClassNode.SubDesc:=ClassNode.SubDesc or ctnsForwardDeclaration;
end else begin
// very short class found e.g. = class(TAncestor);
end;

View File

@ -79,7 +79,7 @@ type
fSearchProject: boolean;
fTheDirectory: string;
fAborting: boolean;
procedure DoFindInFiles(TheFileName: string);
procedure DoFindInFiles(ADirectory: string);
procedure DoFindInSearchList;
procedure SetResultsList(const AValue: TStrings);
procedure UpdateMatches;
@ -797,16 +797,16 @@ end;
{ TSearchProgressForm }
procedure TSearchProgressForm.DoFindInFiles(TheFileName: string);
procedure TSearchProgressForm.DoFindInFiles(ADirectory: string);
var
Searcher: TLazFileSearcher;
begin
//if we have a list and a valid directory
if (DirPathExists(TheFileName)) then
if (DirPathExists(ADirectory)) then
begin
Searcher := TLazFileSearcher.Create(Self);
try
Searcher.Search(TheFileName, FMask, FRecursive,';');
Searcher.Search(ADirectory, FMask, FRecursive,';');
finally
Searcher.Free;
end;