mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 00:42:39 +02:00
codetools: fixed parsing forward class
git-svn-id: trunk@29347 -
This commit is contained in:
parent
e187934649
commit
49c7f66c0f
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user