Cross referencing in Ddoc

Sönke Ludwig sludwig at outerproduct.org
Mon Dec 30 04:55:36 PST 2013


Am 30.12.2013 13:47, schrieb Jacob Carlborg:
> On 2013-12-30 12:39, Sönke Ludwig wrote:
> 
>> Although I think that it is more important to have a well defined
>> documentation format that can be processed by external tools, it would
>> indeed be much nicer if for example DMD could automatically emit $(XREF
>> ...) or similar for recognized symbol names. Another thing that would
>> sometimes be nice is to group functions by category (even though most of
>> the time using different modules is arguably the better choice). Using
>> custom HTML macros is sub optimal for many reasons and some kind of
>> little DDOC syntax similar to sections could do wonders there.
>>
>> All in all, it's good to have a built-in solution available (and
>> especially important to facilitate a standard documentation format), but
>> many things that a separate tool can do (global indexes, search, custom
>> page structure, per declaration pages, etc.) would IMHO be overkill to
>> have in the compiler. It's still a compiler after all.
> 
> Sure, it always leads back to the same problem: have the compiler
> available as a library. I guess the JSON output is some kind of middle
> ground.
> 

Absolutely! I hope at least the lexer will find it's way into Phobos
soon. A lot of potential is effectively sleeping there.


More information about the Digitalmars-d mailing list