On 2013-12-31 11:05, Vladimir Panteleev wrote:

I agree that a good compromise would be to lighten the syntactic overhead.

How about using the $(D) macro instead of $(REF)? This macro
syntax-highlights its parameter as D code, and in Phobos it is already
used for identifiers, so I think a good solution would be to find and
create cross-reference links only for $(D contents).

Also, I'd like to mention a previous idea I posted here: this problem,
and several other problems we have with DDoc, would be gone if we'd put
what we already have with what we already have, and allow writing D code
that gets interpreted to translate documentation comments into
documentation output, using our existing CTFE capabilities. This way,
the entire DDoc syntax can be reimplemented using "library" D code,
interpreted by the compiler during documentation generation, and anyone
could build upon it or completely replace it with another syntax.

Isn't this something Sönke has done with DDOX and with the help of the JSON output?

I've been thinking that it probably wouldn't be that hard to create a __trait that return the ddoc comments of a symbol. Don't know how much that would be different from the JSON output though.

--
/Jacob Carlborg

Reply via email to