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
TUnaryExpr,TBinaryExpr,TPrimitiveExpr,TBoolConstExpr,TNilExpr,TParamsExpr,TRecordValues,TArrayValues
must override the
function GetDeclaration(full : Boolean) : string; virtual;
function to output the pascal code that corresponds to the expression.
And finally
TPasVariable.GetDeclaration must be adapted so it adds
Expr.GetDeclaration(Full) to the output.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel