فهرست منبع

fpdoc: cleaned up obsolete okspecialize code

git-svn-id: trunk@38186 -
Mattias Gaertner 7 سال پیش
والد
کامیت
c8fe0d342f
4فایلهای تغییر یافته به همراه17 افزوده شده و 53 حذف شده
  1. 2 22
      packages/fcl-passrc/examples/test_parser.pp
  2. 5 5
      packages/fcl-passrc/src/pasresolver.pp
  3. 10 21
      utils/fpdoc/dw_html.pp
  4. 0 5
      utils/fpdoc/dw_xml.pp

+ 2 - 22
packages/fcl-passrc/examples/test_parser.pp

@@ -1459,30 +1459,10 @@ procedure GetTypes(pe:TPasElement; lindent:integer);
      else
        write(s,pc.Name,' = ');
      if pc.IsPacked then write('packed ');
-     case pc.ObjKind of
-      okObject:write('Object');
-      okClass:write('Class');
-      okInterface:write('Interface');
-      okGeneric:write('class');
-      okspecialize : write('specialize');
-     end;
+     write(ObjKindNames[pc.ObjKind]);
      if assigned(pc.AncestorType) and (pc.AncestorType.ElementTypeName <> '') then
         begin
-        if pc.ObjKind<>okspecialize then
-          write('(',pc.AncestorType.Name,')')
-        else
-          begin
-          write(' ',pc.AncestorType.Name);
-          for l:=0 to pc.GenericTemplateTypes.Count-1 do
-           begin
-           if l=0 then
-            Write('<')
-           else
-            Write(',');
-           Write(TPasGenericTemplateType(pc.GenericTemplateTypes[l]).Name);
-           end;
-          Write('>');
-          end;
+        write('(',pc.AncestorType.Name,')');
         end;
      if pc.IsForward or pc.IsShortDefinition then //pparser.pp: 3417 :class(anchestor); is allowed !
       begin

+ 5 - 5
packages/fcl-passrc/src/pasresolver.pp

@@ -1829,21 +1829,21 @@ begin
   if C=TPasAliasType then
     Result:='alias'
   else if C=TPasPointerType then
-    Result:='pointer of'
+    Result:='pointer'
   else if C=TPasTypeAliasType then
     Result:='type alias'
   else if C=TPasClassOfType then
-    Result:='class of'
+    Result:='class-of'
   else if C=TPasSpecializeType then
     Result:='specialize'
   else if C=TInlineSpecializeExpr then
-    Result:='inline specialize'
+    Result:='inline-specialize'
   else if C=TPasRangeType then
     Result:='range'
   else if C=TPasArrayType then
     Result:='array'
   else if C=TPasFileType then
-    Result:='file of'
+    Result:='file'
   else if C=TPasEnumValue then
     Result:='enum value'
   else if C=TPasEnumType then
@@ -1863,7 +1863,7 @@ begin
   else if C=TPasFunctionType then
     Result:='functional type'
   else if C=TPasStringType then
-    Result:='string'
+    Result:='string[]'
   else if C=TPasVariable then
     Result:='var'
   else if C=TPasExportSymbol then

+ 10 - 21
utils/fpdoc/dw_html.pp

@@ -3383,32 +3383,21 @@ var
       AppendGenericTypes(CodeEl,AClass.GenericTemplateTypes,false);
     AppendSym(CodeEl, '=');
     AppendText(CodeEl, ' ');
-    if AClass.ObjKind<>okSpecialize then
-      AppendKw(CodeEl, ObjKindNames[AClass.ObjKind])
-    else
-      AppendKw(CodeEl, ' specialize ');
+    AppendKw(CodeEl, ObjKindNames[AClass.ObjKind]);
 
     if Assigned(AClass.AncestorType) then
     begin
-      if AClass.ObjKind=okSpecialize then
-        begin
-        AppendHyperlink(CodeEl, AClass.AncestorType);
-        AppendGenericTypes(CodeEl,AClass.GenericTemplateTypes,true)
-        end
-      else
+      AppendSym(CodeEl, '(');
+      AppendHyperlink(CodeEl, AClass.AncestorType);
+      if AClass.Interfaces.count>0 Then
         begin
-        AppendSym(CodeEl, '(');
-        AppendHyperlink(CodeEl, AClass.AncestorType);
-        if AClass.Interfaces.count>0 Then
-          begin
-            for i:=0 to AClass.interfaces.count-1 do
-             begin
-               AppendSym(CodeEl, ', ');
-               AppendHyperlink(CodeEl,TPasClassType(AClass.Interfaces[i]));
-             end;
-          end;
-        AppendSym(CodeEl, ')');
+          for i:=0 to AClass.interfaces.count-1 do
+           begin
+             AppendSym(CodeEl, ', ');
+             AppendHyperlink(CodeEl,TPasClassType(AClass.Interfaces[i]));
+           end;
         end;
+      AppendSym(CodeEl, ')');
     end;
     CreateMemberDeclarations(AClass, AClass.Members,TableEl, not AClass.IsShortDefinition);
 

+ 0 - 5
utils/fpdoc/dw_xml.pp

@@ -439,7 +439,6 @@ var
       okClass: ClassEl := Result.CreateElement('class');
       okObject: ClassEl := Result.CreateElement('object');
       okInterface: ClassEl := Result.CreateElement('interface');
-      okSpecialize: ClassEl := Result.CreateElement('classspecialized');
       //okGeneric: Result.CreateElement('generic');
       //okClassHelper: Result.CreateElement('classhelper');
       //okRecordHelper: Result.CreateElement('recordhelper');
@@ -457,10 +456,6 @@ var
       if Assigned(AClass.AncestorType) then
         ClassEl['parentclass'] := AClass.AncestorType.Name;
 
-      if AClass.ObjKind = okSpecialize then
-      begin
-        ProcessGenericTypes(AClass.GenericTemplateTypes, ClassEl);
-      end;
       AddSourceInfo(AClass,ClassEl);
 
       if Assigned(AClass.Interfaces) then