Skip to content
Permalink
Browse files
handle '-t' option for dumping the Lua AST
  • Loading branch information
richardhundt committed Sep 7, 2013
1 parent c1608e0 commit 2804a70
Showing 1 changed file with 5 additions and 1 deletion.
@@ -5,12 +5,16 @@ local util = require('util')

local function compile(src, name, opts)
local srctree = parser.parse(src)

if opts and opts['-a'] then
print("AST:", util.dump(srctree))
end

local dsttree = transformer.transform(srctree, src)
--print("DST:", util.dump(dsttree))

if opts and opts['-t'] then
print("DST:", util.dump(dsttree))
end

local luacode
if opts and opts['-s'] then

0 comments on commit 2804a70

Please sign in to comment.