[Issue 6946] Compile-time flags generator

Orvid King blah38621 at gmail.com
Fri Apr 11 05:39:51 PDT 2014


Actually, if we would already be doing partial tokenization, then I
would suspect it wouldn't be that hard to add support for extracting
documentation and putting them in the generated code for the mixin.
Also, to keep with standard D style, where the name of the type comes
before it's definition, perhaps the recommended syntax for the mixin
would be (provided it's currently possible):
mixin MyFlags = BitFlags!q{ A, B, C, D };

On 4/11/14, d-bugmail at puremagic.com <d-bugmail at puremagic.com> wrote:
> https://issues.dlang.org/show_bug.cgi?id=6946
>
> --- Comment #12 from Nick Treleaven <ntrel-public at yahoo.co.uk> ---
> (In reply to bearophile_hugs from comment #11)
>> (In reply to comment #10)
>> > mixin BitFlags!q{A, B, C, D} MyFlags;
>
> A better reason for this syntax is that is gives a name for ddoc to use for
> documentation. Unfortunately the members can't be documented though.
>
>> Is your version using a function like isReservedWord() I have shown in
>> the
>> first posts here?
>
> I haven't actually implemented it, it could do.
>
> --
>


More information about the Digitalmars-d-bugs mailing list