In brief, Hyperlua is a source-to-source translator from some
"enriched" Lua to a "plain" Lua. Resulted plain lua files require no
runtime support at all. Hyperlua is 100% back compatible to Lua 5.1.
It sort-of sounds like metalua without the bytecode generator, including the AST bits you're using as samples. Was there a reason not to start from Metalua's "match" extension, other than the fun to redo everything from scratch for the sake of it?