tiny .luk -> Lua transpiler (~120-line module)

$ luarocks install luk

luk is the .luk language: Lua plus Python-style indented
blocks ("if x:" ... dedent closes it), `fn`, `^` for return,
`:=` locals, `!=`, `elif`, and comprehensions. Explicit
then/do/else/end still works, so any Lua is (almost)
valid luk. Generated Lua keeps the source's line numbers.

The module returns a single function and installs a
require() hook for .luk modules:
local luk = require("luk")
local lua_src = luk(luk_src)

Worked example (fft.luk, a multi-objective regression tree)
at https://github.com/aiez/luk.

Versions

0.3-213 hours ago1 download
0.3-113 hours ago1 download

Dependencies

lua >= 5.3

Manifests