[fpc-devel] FPDoc imports

Michael Van Canneyt michael at freepascal.org
Tue Jan 31 11:00:00 CET 2012



On Tue, 31 Jan 2012, Hans-Peter Diettrich wrote:

> In an attempt to help improve fpdoc I'm blocked in understanding the handling 
> of imported modules. The content files are imported into the link tree, but 
> this tree seems not to be used in finding external identifiers?

The content files are converted to 2 kinds of trees:
- A TPasElement tree. 
- A link tree.

The link tree is used in TFPDocEngine.ResolveLink and THTMLWriter.ResolveLinkID

The paselement tree is used by the parser to find identifiers (classes mostly, 
for inheritance trees), so there are less TPasUnsolvedTypeRef instances.

> Instead packages are searched, where I could not yet figure out how these are 
> constructed. When the FCL documentation is created, which imports package 
> (content file) RTL, a package RTL seems to be created, somehow, but its 
> content is not related to the content file. In detail unit System never 
> becomes part of the RTL package?
>
> Can somebody explain the creation and population of external packages a bit? 
> What's the purpose of these packages at all, when the essential information 
> about identifiers is contained in the content files?

The purpose is to try and let the parser resolver find identifiers as if they had been parsed.
(compare it to the info in a .ppu file)

> Would it help if I try to create packages from the imports?

No.

Michael.



More information about the fpc-devel mailing list