lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

In message <> you wrote:

> > Would it be possible, I wonder, to add some sugar that allowed
> > the notation "x = %d\n":format(123)? There is the precedent of
> > letting literal strings lose the parentheses when they are a
> > single argument to a function. I cannot see any ambiguities
> > arising
> Note that
> a=f
> "x = %d\n":format(123)
> is parsed as
> a=f"x = %d\n":format(123)
> which is probably not what you meant.
> --lhf

Yes, I had thought about the <fn expr> <string literal> <colon> collision.
I suppose that a=f;"x = %d\n":format(123) and a=f("x = %d\n":format(123))
would both be unambiguous.

Gavin Wraith (
Home page: