@@ -3315,7 +3315,21 @@ merge(Compressor.prototype, {
|
||||
});
|
||||
|
||||
AST_Definitions.DEFMETHOD("remove_initializers", function(){
|
||||
this.definitions.forEach(function(def){ def.value = null });
|
||||
var decls = [];
|
||||
this.definitions.forEach(function(def) {
|
||||
if (def.name instanceof AST_SymbolDeclaration) {
|
||||
def.value = null;
|
||||
decls.push(def);
|
||||
} else def.name.walk(new TreeWalker(function(node) {
|
||||
if (node instanceof AST_SymbolDeclaration) {
|
||||
decls.push(make_node(AST_VarDef, def, {
|
||||
name: node,
|
||||
value: null
|
||||
}));
|
||||
}
|
||||
}));
|
||||
});
|
||||
this.definitions = decls;
|
||||
});
|
||||
|
||||
AST_Definitions.DEFMETHOD("to_assignments", function(compressor){
|
||||
|
||||
Reference in New Issue
Block a user