Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

luacodegen

luacodegen generates lua code from an ast. It is intended to be used with the tree produced by luaparse but this is not a hard requirement. The code generated is intended to have exactly the same ast as the initial input except with better formatting.

Example

constluaparse=require("luaparse");constluacodegen=require("luacodegen");consttree=luaparse.parse("local function a(b) if (b) then return 1 else return 2 end end");constcode=luacodegen(tree);/*local function a (b)	if (b) then return 1;	else return 2;	endend*/

About

Generate pretty lua code from an ast

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages