mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-17 05:00:37 +01:00
+ More intelligent handling of nodes. Do not write unused nodes.
This commit is contained in:
parent
30c326bd62
commit
b3bc9fe727
@ -82,6 +82,24 @@ function TSkelEngine.CreateElement(AClass: TPTreeElement; const AName: String;
|
|||||||
Writeln(stderr,'Creating documentation for new node ',APasElement.PathName);
|
Writeln(stderr,'Creating documentation for new node ',APasElement.PathName);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Function WriteOnlyShort(APasElement : TPasElement) : Boolean;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result:=(APasElement.ClassType=TPasArgument) or
|
||||||
|
(APasElement.ClassType=TPasResultElement) or
|
||||||
|
(APasElement.ClassType=TPasEnumValue);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function IsTypeVarConst(APasElement : TPasElement) : Boolean;
|
||||||
|
|
||||||
|
begin
|
||||||
|
With APasElement do
|
||||||
|
Result:=(InheritsFrom(TPasType) and not InheritsFrom(TPasClassType)) or
|
||||||
|
(InheritsFrom(TPasResString)) or
|
||||||
|
(InheritsFrom(TPasVariable));
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := AClass.Create(AName, AParent);
|
Result := AClass.Create(AName, AParent);
|
||||||
@ -119,18 +137,21 @@ begin
|
|||||||
Writeln(F,'<!-- ', Result.ElementTypeName,' Visibility: ',VisibilityNames[AVisibility], ' -->');
|
Writeln(F,'<!-- ', Result.ElementTypeName,' Visibility: ',VisibilityNames[AVisibility], ' -->');
|
||||||
WriteLn(f,'<element name="', Result.FullName, '">');
|
WriteLn(f,'<element name="', Result.FullName, '">');
|
||||||
WriteLn(f, '<short></short>');
|
WriteLn(f, '<short></short>');
|
||||||
WriteLn(f, '<descr>');
|
if Not WriteOnlyShort(Result) then
|
||||||
WriteLn(f, '</descr>');
|
begin
|
||||||
if not DisableErrors then
|
WriteLn(f, '<descr>');
|
||||||
begin
|
WriteLn(f, '</descr>');
|
||||||
WriteLn(f, '<errors>');
|
if not (DisableErrors or IsTypeVarConst(Result)) then
|
||||||
WriteLn(f, '</errors>');
|
begin
|
||||||
end;
|
WriteLn(f, '<errors>');
|
||||||
if not DisableSeealso then
|
WriteLn(f, '</errors>');
|
||||||
begin
|
end;
|
||||||
WriteLn(f, '<seealso>');
|
if not DisableSeealso then
|
||||||
WriteLn(f, '</seealso>');
|
begin
|
||||||
end;
|
WriteLn(f, '<seealso>');
|
||||||
|
WriteLn(f, '</seealso>');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
WriteLn(f, '</element>');
|
WriteLn(f, '</element>');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -328,7 +349,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.11 2004-08-28 18:18:59 michael
|
Revision 1.12 2004-08-29 15:32:41 michael
|
||||||
|
+ More intelligent handling of nodes. Do not write unused nodes.
|
||||||
|
|
||||||
|
Revision 1.11 2004/08/28 18:18:59 michael
|
||||||
+ Do not write descr nodes for module when updating
|
+ Do not write descr nodes for module when updating
|
||||||
|
|
||||||
Revision 1.10 2004/08/28 18:15:14 michael
|
Revision 1.10 2004/08/28 18:15:14 michael
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user