Paul Berg
🌞
🌛
Linkedin
Google Scholar
GitHub
Lua
A surprising lua parse error
17/06/2025 · 1 minute
Lua
PL
While working on my lua VM, I encountered the following parse error: lune> function f() local x<const> x = nil 2: local x<const> 3: x = nil ^ error: AssignToConst This error surprised me because the input is not parsable because the body of the function is never closed with an end. In the REPL of this VM, the parser is run every time a new line is added to see whether or not it …