dlangspec.pdf?

Walter Bright newshound2 at digitalmars.com
Wed Jan 9 11:01:32 PST 2013


On 1/9/2013 2:40 AM, Philippe Sigaud wrote:
> On Wed, Jan 9, 2013 at 2:05 AM, Walter Bright
> <newshound2 at digitalmars.com> wrote:
>
>> I'd still like to see it done as a phobos module. Maybe an enhancement
>> request?
>
> So, this should:
>
> - take a .ddoc file for macro definition, or a [name, code] range of pairs.
> - read an input range
>      - this range can be a standard D file, a .dd or whatever. That
> means parsing D comments...
> - find any macro definition
> - find any $(NAME Args,) call, expand it recursively. Repeat until
> nothing changes anymore. This should be done lazily (through the input
> range interface), in case the user want to stop before the end.
> - output the result as a range.
>
> What I'm not clear about, is: if the input is a D source file, should
> the expander strip any D code from it? Should this return a
> full-fledged documentation (ie, find the documented symbols...) or
> just blindly expand DDoc macros.
>

No no no. The module gets its input from an InputRange. Not a file. It gets its 
macro definitions, which are NAME=VALUE pairs, from an associative array of them.


More information about the Digitalmars-d mailing list