www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - CTFE + DDoc

reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
I don't know if it's been proposed before, but would it be 
feasible to allow the D compiler to interpret some D code that 
would emit DDoc?

This would allow more powerful macros, and together with __traits 
functionality that retrieves a symbol's DDoc, it could also be 
used to generate an index as discussed in the other thread, 
without having to rely on JavaScript or a separate 
post-processing step.
Sep 16 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-09-16 09:35, Vladimir Panteleev wrote:
 I don't know if it's been proposed before, but would it be feasible to
 allow the D compiler to interpret some D code that would emit DDoc?

 This would allow more powerful macros, and together with __traits
 functionality that retrieves a symbol's DDoc, it could also be used to
 generate an index as discussed in the other thread, without having to
 rely on JavaScript or a separate post-processing step.
You could possibly use a string mixin. To mixin the ddoc comment. Don't know if that would work. I think it's better to fix any problems in the compiler generating the docs. All this symbol lists made with JavaScript or generating documentation from JSON are just workarounds. -- /Jacob Carlborg
Sep 16 2013