on DDoc macros: a small problem
Charles Hixson
charleshixsn at earthlink.net
Wed Feb 20 09:55:50 PST 2013
On 02/20/2013 12:51 AM, Johannes Pfau wrote:
> Am Tue, 19 Feb 2013 16:43:09 -0800
> schrieb Charles Hixson<charleshixsn at earthlink.net>:
>
>> I have, towards the start of my file:
>>
>> /** Macros:
>> * Note = $(BR)$(BIG$(B$(GREEN Note:)))
>> * Todo =<br><font color=red><b>ToDo:</b> $0</font><br>
>> * Em = $(B$(BLUE $0))
>> * DoNotUse = $(B Do Not Use $0)
>> */
>>
>> Why do I need that DoNotUse macro to terminate the Em macro? If I
>> don't include it, the Em macro picks up the first line of the next
>> documentation comment, and includes it as a part of itself. I'm
>> clearly doing something wrong, but I have no idea what.
>
> I guess if you include the DoNotUse macro, the next line will just be
> part of it. That's because we somehow have to support multi-line
> macros. A macros is only finished if a new macro is started or a new
> Section starts. So you'll have to either write your text above the macro
> section or you have to start a new section:
>
> /**
> * Summary text goes here
> *
> *Macros:
> * Note = $(BR)$(BIG$(B$(GREEN Note:)))
> * Todo =<br><font color=red><b>ToDo:</b> $0</font><br>
> * Em = $(B$(BLUE $0))
> *Note:
> * More text here
> */
>
> More information: http://dlang.org/ddoc.html
Thank you. I had read http://dlang.org/ddoc.html, but what I got out of
it was that a macro was concluded when the parentheses balanced.
Looking over it, though, I see that in the Note macro they balanced
twice, so I wasn't understanding in a consistent way.
More information about the Digitalmars-d-learn
mailing list