AST cleanup (dropped AST_StatementBase)

This commit is contained in:
Mihai Bazon
2012-10-03 15:41:11 +03:00
parent 9221ad62db
commit 3412498795
3 changed files with 25 additions and 23 deletions

View File

@@ -162,7 +162,7 @@ merge(Compressor.prototype, {
if (thing === null) return [];
if (thing instanceof AST_BlockStatement) return thing.body;
if (thing instanceof AST_EmptyStatement) return [];
if (thing instanceof AST_StatementBase) return [ thing ];
if (thing instanceof AST_Statement) return [ thing ];
throw new Error("Can't convert thing to statement array");
};
@@ -741,7 +741,7 @@ merge(Compressor.prototype, {
return thing && thing.aborts();
};
(function(def){
def(AST_StatementBase, function(){ return null });
def(AST_Statement, function(){ return null });
def(AST_Jump, function(){ return this });
def(AST_BlockStatement, function(){
var n = this.body.length;