DDoc and mixins

Ary Manzana ary at esperanto.org.ar
Sun May 6 17:51:27 PDT 2007


I already asked for this:

news://news.digitalmars.com:119/erib78$g6c$1@digitalmars.com

with no answer. :-(

Maybe some think that if the code is generated by a mixin, than it is 
trivial or easy to understand, because it follows a pattern (for 
example, properties). However if a lot of classes are to be generated 
this way, and they'll be part of some library, then you'd really like 
them to have comments.

Gerald Stocker escribió:
> Hello,
> 
> Is there any way to attach a documentation comment to declarations that 
> are generated by mixins? Neither of the following work:
> 
> /// Documentation for foo.
> mixin("int foo;");
> 
> mixin("int foo; /// Documentation for foo.");
> 
> I am working on a 6502 emulator in D which relies heavily on CTFE + 
> mixins to generate methods for each of the 6502's opcodes. The code is 
> heavily commented with details of 6502 behavior, and I'd like to be able 
> to include those comments in the generated ddoc documentation.
> 
> --Gerald



More information about the Digitalmars-d mailing list