~technomancy/antifennel

ref: c436ed1418acd1cecf63db41326617101688afa1 antifennel/README.md -rw-r--r-- 788 bytes
c436ed14Phil Hagelberg Avoid conflicts with reserved fennel names in identifiers. 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Antifennel

Turn Lua code into Fennel code.

Does the opposite of what the Fennel compiler does.

## Usage

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

## Limitations

Very immature.

Currently it does very little validation and will almost certainly
emit Fennel which won't compile. It assumes all locals are vars even
if they are never modified.

Certain Lua constructs are not supported in Fennel such as `goto`,
`repeat`, `break`, and early `return`s.

Setting globals is not supported unless you use `_G.foo = bar` notation.

## Copyright

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](https://github.com/franko/luajit-lang-toolkit)