[fpc-devel] fpdoc fails to get full declaration of constants
Michael Van Canneyt
michael at freepascal.org
Wed Aug 4 10:11:15 CEST 2010
On Wed, 4 Aug 2010, Graeme Geldenhuys wrote:
> Op 2010-08-04 09:48, Michael Van Canneyt het geskryf:
>> The bug is due to a fcl-passrc bug in pastree: each element should be able to output itself.
>> The HTML code does not use this feature, but the linear output engine does.
> If you don't have time to look at it, any hints of where in the fcl-passrc
> code I should start looking for the bug. I don't know fcl-passrc code at
> all. The pastree unit doesn't look to big, so if the bug is in there,
> hopefully I can find it. If the parser failed to generate a token/node for
> the required constant value information, then that's another story.
> I can confirm that the following fpdoc output all have this bug:
> * Plain Text (txt)
> * LaTeX (latex)
> * Rich Text (rtf)
> * New IPF (ipf)
> Not sure about
> * Man (this gives an Access Violation when run)
> * XML (this gives an Access Violation when run)
> This means your can't generate new documentation for FPC 2.4.2 release
> either. ;-)
No, since we use the version in the fixes branch. That should not have the bug.
It is the new expression support which creates the bug...
In the pastree unit, the TPasExpr class must be made a descendent of TPasElement.
Then the classes
must override the
function GetDeclaration(full : Boolean) : string; virtual;
function to output the pascal code that corresponds to the expression.
TPasVariable.GetDeclaration must be adapted so it adds Expr.GetDeclaration(Full) to the output.
More information about the fpc-devel