On Thu, 01 Jan 2015 13:21:16 +1300
Rikki Cattermole via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> Although this is a little extreme compared to my original post...

a little. ;-)

yes, processing ASTs with CTFE will be great, but this is huge task.
replacing Ddoc with CTFE which receives an array (tuple? ;-) of
functions with documentation text (preprocessed a little, see below) is
a lighter task. then we can use compile-time introspection to get
function args and so, and format the output as we like.

"small preprocessing" converts the following:

  /** text0
    * text1
    * text2
    */

to:

  text0
  text1
  text2

i.e. just removing that indentation with corresponding '*'. it's easy
and must be done for any formatting, so it can be done before invoking
CTFE. just make sure that the following will not be processed:

  /** text0
    * text1
      heh
    * text2
    */

there is no vertical line of '*', so no need to remove leading '*' here.

Attachment: signature.asc
Description: PGP signature

Reply via email to