[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RDoc and preprocessor generated functions

leon breedt

1/23/2005 5:23:00 AM

Hi,

An extension I'm documenting has several functions and Ruby classes
that are generated by the preprocessor.

Is there any way to generate RDoc for a C function, without it trying
to validate that the function exists? I have several Document-method
calls for generated methods, but none of the methods even show up.

Document-class and Document-method don't quite seem to work as I'd
expect either.

The first Document-class: Some::Generated::Class in the file is used
for the "module" comment, even if I explicitly put Document-class:
Module::Name in front of the Init() method.

I'd prefer not to have to do actual source code modifications outside
of comments to achieve this...

Thanks :)
Leon


1 Answer

leon breedt

1/23/2005 10:09:00 AM

0

On Sun, 23 Jan 2005 18:22:13 +1300, leon breedt <bitserf@gmail.com> wrote:
> The first Document-class: Some::Generated::Class in the file is used
> for the "module" comment, even if I explicitly put Document-class:
> Module::Name in front of the Init() method.
This would appear because the module of Some::Generated::Class's is
the same as that of Module::Name.

In other words, the Document-class: regexp in C_Parser#find_comment in
parse_c.rb is too greedy:

elsif @body =~ %r{Document-(class|module):\s#{class_name}.*?\n((?>.*?\*/))}m

The .* after #{class_name} seems to be causing the problem.

For example, if you placed a comment containing Document-class:
Module::Class before a comment containing Document-class: Module, the
first comment would always be used regardless (1.8.2).

Leon