upgrade AST<->ESTree translation (#4870)

fixes #968
This commit is contained in:
Alex Lam S.L
2021-04-26 04:23:52 +08:00
committed by GitHub
parent 80efaa2f33
commit 324587f769
8 changed files with 801 additions and 177 deletions

View File

@@ -56,6 +56,9 @@ if (+process.env["UGLIFY_BUG_REPORT"]) exports.minify = function(files, options)
function describe_ast() {
var out = OutputStream({ beautify: true });
doitem(AST_Node);
return out.get() + "\n";
function doitem(ctor) {
out.print("AST_" + ctor.TYPE);
var props = ctor.SELF_PROPS.filter(function(prop) {
@@ -86,9 +89,7 @@ function describe_ast() {
});
});
}
};
doitem(AST_Node);
return out + "\n";
}
}
function infer_options(options) {