It is legal to do a forward declaration of a local variable without initializing it and follow it up with a comment:
local theVar -- will be assigned later
local anotherVar -- also assigned later
However this throws a ParseException in a minimal test case project.
Assigning a value makes it work:
local theVar = 0 -- not throwing
The same works fine in a Lua online compiler, ie this one:
https://www.tutorialspoint.com/compilers/online-lua-compiler.htm
Edit: Looks like an assignment is expected in this case, a forward-declaration is just not considered by the code as a valid statement.