DIP 1007 - keywords as identifiers with an escape symbol - feedback

Basile B. via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 22 02:35:23 PST 2016


On Thursday, 22 December 2016 at 10:11:19 UTC, Basile B. wrote:
> On Thursday, 22 December 2016 at 04:11:54 UTC, Chris Wright 
> wrote:
>> While we're talking about this, this proposal breaks any 
>> string mixin that mixes in an identifier detected with 
>> reflection.
>
> RIP DIP 1007. It was too simple to be true.

I see something to do to continue the DIP

SpecialTokenSequence:
     SpecialTokenSequencePrefix line IntegerLiteral EndOfLine
     SpecialTokenSequencePrefix line IntegerLiteral Filespec 
EndOfLine
     SpecialTokenSequencePrefixes Keyword

SpecialTokenSequencePrefix:
     #

SpecialTokenSequencePrefixes:
     SpecialTokenSequencePrefix SpecialTokenSequencePrefixes


Which means that you can use As many # as you want to escape a 
keyword.
Mixins cannot introspect themselves so basically 'pound pound' 
will always work.
And this is still a simple thing that can be done in the lexer.


More information about the Digitalmars-d mailing list