mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 14:13:52 +01:00
resolver: cleaned up
git-svn-id: trunk@41064 -
This commit is contained in:
parent
4ab30223d3
commit
c7c8f8ed6a
@ -1482,8 +1482,6 @@ type
|
|||||||
procedure FinishSection(Section: TPasSection); virtual;
|
procedure FinishSection(Section: TPasSection); virtual;
|
||||||
procedure FinishInterfaceSection(Section: TPasSection); virtual;
|
procedure FinishInterfaceSection(Section: TPasSection); virtual;
|
||||||
procedure FinishTypeSection(El: TPasElement); virtual;
|
procedure FinishTypeSection(El: TPasElement); virtual;
|
||||||
procedure FinishDeclarations(El: TPasDeclarations); virtual;
|
|
||||||
procedure FinishMemberType(El: TPasMembersType); virtual;
|
|
||||||
procedure FinishTypeSectionEl(El: TPasType); virtual;
|
procedure FinishTypeSectionEl(El: TPasType); virtual;
|
||||||
procedure FinishTypeDef(El: TPasType); virtual;
|
procedure FinishTypeDef(El: TPasType); virtual;
|
||||||
procedure FinishEnumType(El: TPasEnumType); virtual;
|
procedure FinishEnumType(El: TPasEnumType); virtual;
|
||||||
@ -5097,42 +5095,43 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPasResolver.FinishTypeSection(El: TPasElement);
|
procedure TPasResolver.FinishTypeSection(El: TPasElement);
|
||||||
|
|
||||||
|
procedure FinishDeclarations(El: TPasDeclarations);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
Decl: TPasElement;
|
||||||
|
begin
|
||||||
|
for i:=0 to El.Declarations.Count-1 do
|
||||||
|
begin
|
||||||
|
Decl:=TPasElement(El.Declarations[i]);
|
||||||
|
if Decl is TPasType then
|
||||||
|
FinishTypeSectionEl(TPasType(Decl));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure FinishMembersType(El: TPasMembersType);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
Decl: TPasElement;
|
||||||
|
begin
|
||||||
|
for i:=0 to El.Members.Count-1 do
|
||||||
|
begin
|
||||||
|
Decl:=TPasElement(El.Members[i]);
|
||||||
|
if Decl is TPasType then
|
||||||
|
FinishTypeSectionEl(TPasType(Decl));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
// resolve pending forwards
|
// resolve pending forwards
|
||||||
if El is TPasDeclarations then
|
if El is TPasDeclarations then
|
||||||
FinishDeclarations(TPasDeclarations(El))
|
FinishDeclarations(TPasDeclarations(El))
|
||||||
else if El is TPasMembersType then
|
else if El is TPasMembersType then
|
||||||
FinishMemberType(TPasMembersType(El))
|
FinishMembersType(TPasMembersType(El))
|
||||||
else
|
else
|
||||||
RaiseNotYetImplemented(20181226105933,El);
|
RaiseNotYetImplemented(20181226105933,El);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPasResolver.FinishDeclarations(El: TPasDeclarations);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
Decl: TPasElement;
|
|
||||||
begin
|
|
||||||
for i:=0 to El.Declarations.Count-1 do
|
|
||||||
begin
|
|
||||||
Decl:=TPasElement(El.Declarations[i]);
|
|
||||||
if Decl is TPasType then
|
|
||||||
FinishTypeSectionEl(TPasType(Decl));
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPasResolver.FinishMemberType(El: TPasMembersType);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
Decl: TPasElement;
|
|
||||||
begin
|
|
||||||
for i:=0 to El.Members.Count-1 do
|
|
||||||
begin
|
|
||||||
Decl:=TPasElement(El.Members[i]);
|
|
||||||
if Decl is TPasType then
|
|
||||||
FinishTypeSectionEl(TPasType(Decl));
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPasResolver.FinishTypeSectionEl(El: TPasType);
|
procedure TPasResolver.FinishTypeSectionEl(El: TPasType);
|
||||||
|
|
||||||
function ReplaceDestType(Decl: TPasType; var DestType: TPasType;
|
function ReplaceDestType(Decl: TPasType; var DestType: TPasType;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user