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
I performed a test, the parser is correct and you are wrong, it is very much invalid Lua code, tested with LuaJIT:
luajit: test.lua:5: ambiguous syntax (function call x new statement) near '('
When removing the newlines the parser behaves as expected.
Because, that would be syntactically valid Lua code then.
Conclusion
The following is invalid Lua code:
print()
{
}
(
)
due to newlines; that's just how Lua works, luaparser works correctly in this case by throwing the same syntax error.
The following is syntactically correct Lua code and luaparser does parse it as expected:
Currently the parser throws syntax error here, although it is perfectly valid lua code. When removing the newlines the parser behaves as expected.
The text was updated successfully, but these errors were encountered: