[ES6] Get compress and global_defs working for AST_Class
This commit is contained in:
@@ -2988,6 +2988,12 @@ merge(Compressor.prototype, {
|
||||
return self;
|
||||
});
|
||||
|
||||
OPT(AST_Class, function(self, compressor){
|
||||
// HACK to avoid compress failure.
|
||||
// AST_Class is not really an AST_Scope/AST_Block as it lacks a body.
|
||||
return self;
|
||||
});
|
||||
|
||||
OPT(AST_Yield, function(self, compressor){
|
||||
if (!self.is_star && self.expression instanceof AST_Undefined) {
|
||||
self.expression = null;
|
||||
|
||||
@@ -227,6 +227,12 @@ TreeTransformer.prototype = new TreeWalker;
|
||||
self.value = self.value.transform(tw);
|
||||
});
|
||||
|
||||
_(AST_Class, function(self, tw){
|
||||
if (self.name) self.name = self.name.transform(tw);
|
||||
if (self.extends) self.extends = self.extends.transform(tw);
|
||||
self.properties = do_list(self.properties, tw);
|
||||
});
|
||||
|
||||
_(AST_Expansion, function(self, tw){
|
||||
self.expression = self.expression.transform(tw);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user