define AST_Node.from_mozilla_ast(ast)

returns an UglifyJS2 AST given a Mozilla AST.  Still needs some work to do
(need to create specific nodes like AST_SymbolRef, AST_SymbolLambda
etc. instead of base AST_Symbol, in order for the mangler/compressor to work
properly)
This commit is contained in:
Mihai Bazon
2012-10-03 20:03:17 +03:00
parent 42ce7ed606
commit 2bd8a118c2
2 changed files with 246 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ load_global("../lib/scope.js");
load_global("../lib/output.js");
load_global("../lib/compress.js");
load_global("../lib/sourcemap.js");
load_global("../lib/mozilla-ast.js");
UglifyJS.AST_Node.warn_function = function(txt) {
sys.error("WARN: " + txt);