More lexer questions

Timon Gehr timon.gehr at gmx.ch
Sat Feb 11 15:35:03 PST 2012


On 02/11/2012 09:59 PM, Martin Nowak wrote:
> Just wanted to point you to my working D lexer (needs a CTFE bugfix
> http://d.puremagic.com/issues/show_bug.cgi?id=6815).
>

This seems to do the job:
constfold.c:1566
-        if (tn->ty == Tchar || tn->ty == Twchar || tn->ty == Tdchar)
+        if (tn->isImmutable() && (tn->ty == Tchar || tn->ty == Twchar 
|| tn->ty == Tdchar))

However, I don't know the compiler's internals at all, therefore it is 
quite possible that the fix is incorrect.


> https://gist.github.com/1262321 D part
> https://gist.github.com/1255439 Generic part

Bug: The lexer cannot handle /++/ and /**/ (without new line character 
at the end).


More information about the Digitalmars-d mailing list