lua-users home
lua-l archive

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


On Thu, Oct 18, 2012 at 11:13 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> `[lst]` could force the non-adjustment.
>> `t={[a()],[b()],"third"}`
>
> What would t={[a()]=2} mean then? It already has a meaning.

It would keep the current meaning, as in the following definition of field:

field ::= ‘[’ exp ‘]’ ‘=’ exp | '[' explist ']' | Name ‘=’ exp | exp

We already have `t={foo}` and `t={foo=4}` meaning very different
things, now the same would also be true of `t={[foo()]}` and
`t={[foo()]=4}`.