convert AST_Seq from binary tree to array (#1460)

- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
This commit is contained in:
Alex Lam S.L
2017-04-12 21:56:27 +08:00
committed by GitHub
parent 04b8964505
commit 2244743545
14 changed files with 376 additions and 307 deletions

View File

@@ -50,8 +50,8 @@ function getProps(filename) {
try {
(function walk(node){
node.walk(new U2.TreeWalker(function(node){
if (node instanceof U2.AST_Seq) {
walk(node.cdr);
if (node instanceof U2.AST_Sequence) {
walk(node.expressions[node.expressions.length - 1]);
return true;
}
if (node instanceof U2.AST_String) {

View File

@@ -569,7 +569,7 @@ function getOptions(flag, constants) {
}
}
ast.walk(new UglifyJS.TreeWalker(function(node){
if (node instanceof UglifyJS.AST_Seq) return; // descend
if (node instanceof UglifyJS.AST_Sequence) return; // descend
if (node instanceof UglifyJS.AST_Assign) {
var name = node.left.print_to_string().replace(/-/g, "_");
var value = node.right;
@@ -583,7 +583,7 @@ function getOptions(flag, constants) {
ret[name] = true;
return true; // no descend
}
print_error(node.TYPE)
print_error(node.TYPE);
print_error("Error parsing arguments for flag `" + flag + "': " + x);
process.exit(1);
}));