Browse Source

resolver: cleaned up

git-svn-id: trunk@41064 -
Mattias Gaertner 6 years ago
parent
commit
c7c8f8ed6a
1 changed files with 28 additions and 29 deletions
  1. 28 29
      packages/fcl-passrc/src/pasresolver.pp

+ 28 - 29
packages/fcl-passrc/src/pasresolver.pp

@@ -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;