[Issue 15465] Make the "Ddoc" header optional in .dd files

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Dec 22 17:27:38 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15465

--- Comment #3 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to Adam D. Ruppe from comment #2)
> Just quickly looking at the source: the compiler seems to treat .dd files
> identically as .d files. In any D file, if it starts with "Ddoc", it is
> processed as a gigantic documentation comment by dmodule.parse. (You can
> rename any random .dd file to .d and run it through the compiler to see this
> yourself btw).
> 
> So for this to change, mars.d would have to tell dmodule.d that the file had
> the .dd extension, or otherwise treat it specially compared to other D
> files. Then the first few bytes can be stripped, if present, and you take it
> from there.

Yah, that's right (and might have its uses). When the information "this files
has extension .dd" is present, there's no possible ambiguity so that bit needs
to make the Ddoc part optional.

--


More information about the Digitalmars-d-bugs mailing list