How can I detect syntax errors?

Jun 12, 2014 at 8:21 PM
I passed the string "wqerq qrt " to CompileChunk and it was perfectly happy with giving me a chunk...

Without trying to run it, How can I detect that the string that I passed is not valid lua code?
Jun 12, 2014 at 11:13 PM
Edited Jun 12, 2014 at 11:27 PM
At the time this is correct lua code.

It is compiled to


Actually, this will not compile in c-lua, because the assignment is missing. NeoLua does not force the assignment, but executes the "getmember".

I changed this (Changeset 30565).

To the question:
LuaParseException is thrown on syntax errors.
Marked as answer by jorgeleo on 6/16/2014 at 7:44 AM
Jun 16, 2014 at 1:57 AM
Thank you, this helps alot