ref: 619350b715fffa486a3757604375138688b9d302 antifennel/README.md -rw-r--r-- 927 bytes
619350b7Phil Hagelberg Fix bugs in assigning and returning multivals. 4 months ago


Turn Lua code into Fennel code.

Does the opposite of what the Fennel compiler does.

Very immature.


$ luajit antifennel.lua targetfile.lua > targetfile.fnl

#Current limitations

Assumes all locals are vars, even if they are not modified. All assignments use set-forcibly! even when regular set would do the trick, because we don't track the difference between locals that come from 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.)

#Inherent Limitations

Certain Lua constructs are not supported in Fennel such as goto and repeat.

Copyright © 2020 Phil Hagelberg and Contributors Released under the MIT/X11 license, same as Fennel

Lua parser/lexer (contents of the lang/ directory) by Francesc Abbate