~technomancy/antifennel

c99902b50e05827a4f6a6ee4fa4c68318e1ffd5e — Phil Hagelberg 6 months ago 18cc5a5
Handle nil ASTs.
2 files changed, 3 insertions(+), 1 deletions(-)

M README.md
M anticompiler.fnl
M README.md => README.md +2 -1
@@ 17,7 17,8 @@ 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.
Early returns will compile to invalid Fennel. (This is the only thing
keeping Antifennel from being able to compile its own lexer.)

## Inherent Limitations


M anticompiler.fnl => anticompiler.fnl +1 -0
@@ 168,6 168,7 @@
    "BreakStatement" (break compile ast)
    "DoStatement" (do* compile ast)
    "Vararg" (sym "...")
    nil (sym :nil)

    ;; TODO: confirm it's in the tail position; otherwise compile to lua special
    "ReturnStatement" (vals compile ast)