Skip to content

Commit

Permalink
fixed inconsistencies in metalua --print-ast
Browse files Browse the repository at this point in the history
fixed inconsistencies in metalua --print-ast
  • Loading branch information
Fabien Fleutot committed Jun 15, 2014
1 parent 743fea2 commit 1fec8ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metalua.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ function M.main (...)
-- into +{ return (function(...) -{ast} end)(...) }
local prv_ast = code[last_file_idx]
local new_ast = { tag='Return', prv_ast }
new_ast.source, new_ast.origin, prv_ast.source, prv_ast.origin =
prv_ast.source, prv_ast.origin, nil, nil
code[last_file_idx] = new_ast
end

Expand All @@ -197,7 +199,7 @@ function M.main (...)
local pp_cfg = cfg['print-ast-lineinfo']
and { line_max=1, fix_indent=1, metalua_tag=1 }
or { line_max=1, metalua_tag=1, hide_hash=1 }
pp.print(x, 80, pp_cfg)
pp.print(x, pp_cfg)
end
end

Expand Down

0 comments on commit 1fec8ed

Please sign in to comment.