Cross-references in generated ddoc

Ary Manzana ary at esperanto.org.ar
Thu Apr 5 16:02:49 PDT 2012


On 4/4/12 11:11 PM, Jacob Carlborg wrote:
> On 2012-04-04 15:53, Ary Manzana wrote:
>
>> You are right!
>>
>> I was missing doing cross-reference for template instances. Now I did
>> it, but I was actually forgetting to do cross-references for template
>> instances inside templates. :-P
>>
>> So now I did it. Take a look, much better! :-)
>>
>> http://pancake.io/1e79d0/array.html#array
>
> Thanks, much better now :)
>
>> But you can't reference a function in the generated ddoc. You could do
>> it manually, but then you'd have to figure out the mangling or something
>> like that. Also, when guessing what an identifier resolves to, I can't
>> possibly know which template parameters to use.
>
> For example, Phobos uses XREF to reference symbols. The template
> parameter doesn't matter since that will refer to the same function.
>
>> Also, all overloads will have more or less the same documentation and
>> they will be one next to the other. I don't think that's an issue for a
>> documentation system.
>
> I guess you're right.
>
>> Thanks. I had a problem with template members. It's now fixed.
>>
>> http://pancake.io/1e79d0/complex.html#Complex.toString
>
> Good.
>
>> I wanted to do that. But I have to deal with ddoc macros. Every
>> declaration is put inside a <dt> tag. That is issued with a $(DT ...)
>> macro. So I'd have to create another macro, say $DT_WITH_ID or something
>> like that that outputs the id.
>>
>> I can't simply output an id attribute because I'm not generating html:
>> I'm generating ddoc.
>
> Ok, I see. But why don't you create $DT_WITH_ID then :)

Yes, I think I will eventually do that, if the pull gets accepted.



More information about the Digitalmars-d mailing list