Uniform function call syntax

Nick Sabalausky a at a.a
Thu Oct 8 21:30:50 PDT 2009


"Ellery Newcomer" <ellery-newcomer at utulsa.edu> wrote in message 
news:ham5lo$dq0$1 at digitalmars.com...
> Jacob Carlborg wrote:
>
>> I poked around in the DMD sources I found that it's really easy to add,
>> just edit one line. However there is a problem it don't work for
>> literals like 3.foo(), for that I think that parser needs to be modified.
>>
>
> You'd have to modify a bit more than the parser.
>
> ["3.f",<9>,line=2,col=9]
> ["oo",<4>,line=2,col=12]
> ["(",<146>,line=2,col=14]
> [")",<147>,line=2,col=15]
> [";",<154>,line=2,col=16]
>
> Otherwise, the parser can handle that as is. Surround the 3 with parens.

Yet another example why "1." and ".1" literals are more trouble than they're 
worth. 





More information about the Digitalmars-d mailing list