bakpakin / Fennel

Lua Lisp Language
https://fennel-lang.org
MIT License
2.42k stars 124 forks source link

Bad code generated in the REPL if the name of a local contains a backslash #464

Closed dokutan closed 11 months ago

dokutan commented 12 months ago

When the name of a local contains a backslash, the REPL generates bad code, because the backslash is not escaped when indexing the ___replLocals___ table.

Example:

>> (local \ 1)
Bad code generated - likely a bug with the compiler:
--- Generated Lua Start ---
local _5c = 1
___replLocals___['\'] = _5c
return nil--- Generated Lua End ---