There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
cannot correctly parse return statement
The DocumentParser.Parse method sometimes cannot correctly parse the return statement in any block. If there are any statements before the return statement, the return keyword (KWRETURN) might be considered syntaxtical illegal.
I can figured this problem out by going deeply into the parser code, but cannot tell how to fix it. I tried to modify the parser.y file but failed.
Parsing the following Lua code will recreate this issue:
-- The following code can be correctly parsed
-- The following code will be parsed with the return statement lost
local a = 3