kill the commas! (phobos code cleanup)

via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 3 10:18:51 PDT 2014


On Wednesday, 3 September 2014 at 16:11:39 UTC, Daniel Murphy 
wrote:
> "ketmar via Digitalmars-d"  wrote in message 
> news:mailman.363.1409759971.5783.digitalmars-d at puremagic.com...
>
>> i'm pretty sure that this can be done with a little hack in
>> parseExpression(): just append 'cast(void)0' to the list of 
>> expressions
>> there.
>
> It can be done there, but it would not be 'correct'.  The ast 
> should attempt to match the original code as closely as 
> possible, so that differences are minimized in di generation 
> and other things like that.

The funny thing is, I had to split `CommaExp` into two classes 
not because of the new behaviour, but because the frontend lowers 
things into comma expressions everywhere. If it didn't do this, 
the additional class wouldn't even be necessary.


More information about the Digitalmars-d mailing list