Turn Lua code into Fennel code.
Does the opposite of what the Fennel compiler does.
$ luajit antifennel.lua targetfile.lua > targetfile.fnl
Assumes all locals are vars, even if they are not modified. All
set-forcibly! even when regular
set would do the
trick, because we don't track the difference between locals that come
var vs function parameters.
Early returns will compile to invalid Fennel. (This is the only thing keeping Antifennel from being able to compile its own lexer.)
Certain Lua constructs are not supported in Fennel such as
Copyright © 2020 Phil Hagelberg and Contributors Released under the MIT/X11 license, same as Fennel
Lua parser/lexer (contents of the
by Francesc Abbate