lua-users home
lua-l archive

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

Nevermind, I misunderstood what you meant by "statements". You mean it
could be interpreted as "a = b; [c]:d()"? That's a good point, I guess
there's no getting around that one.

If there was a simple rule to the effect that "if sequence of statements
can be interpreted as a single statement, then it is a single statement",
there would be no ambiguity.

I wish there was something similar to that stated in the docs, it
would give the language more solid feel, even if not changing anything.
Currently, figuring out how exactly Lua grammar is not ambiguous and
why one can omit ';' is actually quite a puzzle.

In a recent discussion it was mentioned about change in 5.2work3 that parses
as a single statement, instead of raising parse error. Is there any other
case left where Lua doesn't follow such rule?