You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PUC Lua 5.1 (and LuaJIT without the LUAJIT_ENABLE_LUA52COMPAT option) rejects code in which an expression is followed by a newline and an opening parenthesis. This is to avoid a parsing ambiguity discussed in the Lua 5.2 manual, §3.3.1, which Lua 5.2 and later instead resolve by introducing an optional explicit statement terminator, ;. (One can also use do...end, which also works in Lua 5.1.)
Currently, luaparse accepts such code with Lua 5.2 semantics (that is, interprets it as a function call); in Lua 5.1 mode, which is the default, it should probably be rejected instead.
The text was updated successfully, but these errors were encountered:
PUC Lua 5.1 (and LuaJIT without the
LUAJIT_ENABLE_LUA52COMPAT
option) rejects code in which an expression is followed by a newline and an opening parenthesis. This is to avoid a parsing ambiguity discussed in the Lua 5.2 manual, §3.3.1, which Lua 5.2 and later instead resolve by introducing an optional explicit statement terminator,;
. (One can also usedo
...end
, which also works in Lua 5.1.)Currently, luaparse accepts such code with Lua 5.2 semantics (that is, interprets it as a function call); in Lua 5.1 mode, which is the default, it should probably be rejected instead.
The text was updated successfully, but these errors were encountered: