mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:36:17 +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;
|
ContextDesc: Word;
|
||||||
IsForward: Boolean;
|
IsForward: Boolean;
|
||||||
ClassDesc: TCodeTreeNodeDesc;
|
ClassDesc: TCodeTreeNodeDesc;
|
||||||
|
ClassNode: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
ContextDesc:=CurNode.Desc;
|
ContextDesc:=CurNode.Desc;
|
||||||
if not (ContextDesc in [ctnTypeDefinition,ctnGenericType,
|
if not (ContextDesc in [ctnTypeDefinition,ctnGenericType,
|
||||||
@ -3766,6 +3767,7 @@ begin
|
|||||||
else
|
else
|
||||||
RaiseStringExpectedButAtomFound('class');
|
RaiseStringExpectedButAtomFound('class');
|
||||||
CreateChildNode;
|
CreateChildNode;
|
||||||
|
ClassNode:=CurNode;
|
||||||
CurNode.Desc:=ClassDesc;
|
CurNode.Desc:=ClassDesc;
|
||||||
CurNode.StartPos:=ClassAtomPos.StartPos;
|
CurNode.StartPos:=ClassAtomPos.StartPos;
|
||||||
IsForward:=true;
|
IsForward:=true;
|
||||||
@ -3829,6 +3831,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if IsForward then begin
|
if IsForward then begin
|
||||||
// forward class definition found
|
// forward class definition found
|
||||||
|
ClassNode.SubDesc:=ClassNode.SubDesc or ctnsForwardDeclaration;
|
||||||
end else begin
|
end else begin
|
||||||
// very short class found e.g. = class(TAncestor);
|
// very short class found e.g. = class(TAncestor);
|
||||||
end;
|
end;
|
||||||
|
@ -79,7 +79,7 @@ type
|
|||||||
fSearchProject: boolean;
|
fSearchProject: boolean;
|
||||||
fTheDirectory: string;
|
fTheDirectory: string;
|
||||||
fAborting: boolean;
|
fAborting: boolean;
|
||||||
procedure DoFindInFiles(TheFileName: string);
|
procedure DoFindInFiles(ADirectory: string);
|
||||||
procedure DoFindInSearchList;
|
procedure DoFindInSearchList;
|
||||||
procedure SetResultsList(const AValue: TStrings);
|
procedure SetResultsList(const AValue: TStrings);
|
||||||
procedure UpdateMatches;
|
procedure UpdateMatches;
|
||||||
@ -797,16 +797,16 @@ end;
|
|||||||
|
|
||||||
{ TSearchProgressForm }
|
{ TSearchProgressForm }
|
||||||
|
|
||||||
procedure TSearchProgressForm.DoFindInFiles(TheFileName: string);
|
procedure TSearchProgressForm.DoFindInFiles(ADirectory: string);
|
||||||
var
|
var
|
||||||
Searcher: TLazFileSearcher;
|
Searcher: TLazFileSearcher;
|
||||||
begin
|
begin
|
||||||
//if we have a list and a valid directory
|
//if we have a list and a valid directory
|
||||||
if (DirPathExists(TheFileName)) then
|
if (DirPathExists(ADirectory)) then
|
||||||
begin
|
begin
|
||||||
Searcher := TLazFileSearcher.Create(Self);
|
Searcher := TLazFileSearcher.Create(Self);
|
||||||
try
|
try
|
||||||
Searcher.Search(TheFileName, FMask, FRecursive,';');
|
Searcher.Search(ADirectory, FMask, FRecursive,';');
|
||||||
finally
|
finally
|
||||||
Searcher.Free;
|
Searcher.Free;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user