lua-users home
lua-l archive

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


But then, this syntax already has a meaning:
local f( val or default ):method()

Ah, good catch. Parentheses do not signal an invalid local name but start a new block without the need for a terminator.

On Wed, Jul 6, 2011 at 2:47 PM, Romulo <romuloab@gmail.com> wrote:
On Wed, Jul 6, 2011 at 16:32, David Hollander <dhllndr@gmail.com> wrote:
> Now let's say I am parsing the following:
> "local success(items, total)"

But then, this syntax already has a meaning:

local f( val or default ):method()

is

local f;
( val or default ):method()



Of course, ( val1, val2 ):method() is syntatically invalid, but it
takes a lookahead parser to know that, and even if you use the simple
form, the ambiguity is still there.

--rb