Allows the use of part of the language keywords?

Basile B. via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 28 01:25:38 PDT 2016


On Sunday, 28 August 2016 at 08:07:27 UTC, Cauterite wrote:
> On Sunday, 28 August 2016 at 04:32:46 UTC, Basile B. wrote:
>> You must keep track of the previous token, which is not 
>> usually done in a scanner.
>
> That sounds like a pretty trivial feature to me. There's no way 
> that's a legitimate obstacle.

Look at this, this is perfectly valid D code:

void main()
in {}
body /**/ #line 8
/**/
//
/+
/+
+/
+/
{}

to think that it can be detected with a simple lookup backward 
(or forward from the KW) is too simplistic.


More information about the Digitalmars-d mailing list