bakpakin / Fennel

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

`comment` macro can leak some code #455

Closed pbaille closed 1 year ago

pbaille commented 1 year ago

The form:

(comment (let [s [1 2]] s))

Is compiling to:

--[[ (let [s [1 2]] s) ]]
return nil

The double square bracket at the end of the let binding vector seems to be interpreted as the end of the lua comment block.

I am using: Fennel 1.3.0 on PUC Lua 5.4

andreyorst commented 1 year ago

This should be fixed in https://git.sr.ht/~technomancy/fennel/commit/5c94c7fe07b3c8901976a8521bff913a6b96cb0d but it's not yet released. You can try ro upgrade fennel to the latest build from git.

pbaille commented 1 year ago

Thank you for the information !