leon breedt
1/23/2005 10:09:00 AM
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