mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 17:39:26 +02:00
fpdoc: cleaned up obsolete okspecialize code
git-svn-id: trunk@38186 -
This commit is contained in:
parent
014a654955
commit
c8fe0d342f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
AppendSym(CodeEl, '(');
|
||||
AppendHyperlink(CodeEl, AClass.AncestorType);
|
||||
if AClass.Interfaces.count>0 Then
|
||||
begin
|
||||
AppendHyperlink(CodeEl, AClass.AncestorType);
|
||||
AppendGenericTypes(CodeEl,AClass.GenericTemplateTypes,true)
|
||||
end
|
||||
else
|
||||
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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user