@@ -8638,17 +8638,26 @@ Compressor.prototype.compress = function(node) {
|
||||
if (base || self.name || !compressor.has_directive("use strict")) {
|
||||
var node = to_class_expr(self);
|
||||
if (!base) node.extends = null;
|
||||
node.properties = values ? values.length == init ? values : [ make_node(AST_ClassField, self, {
|
||||
static: true,
|
||||
key: exprs.length ? make_sequence(self, exprs) : "c",
|
||||
value: make_value(),
|
||||
}) ] : exprs.length ? [ make_node(AST_ClassMethod, self, {
|
||||
node.properties = [];
|
||||
if (values) {
|
||||
if (values.length == init) {
|
||||
if (exprs.length) values.unshift(make_node(AST_ClassField, self, {
|
||||
key: make_sequence(self, exprs),
|
||||
value: null,
|
||||
}));
|
||||
node.properties = values;
|
||||
} else node.properties.push(make_node(AST_ClassField, self, {
|
||||
static: true,
|
||||
key: exprs.length ? make_sequence(self, exprs) : "c",
|
||||
value: make_value(),
|
||||
}));
|
||||
} else if (exprs.length) node.properties.push(make_node(AST_ClassMethod, self, {
|
||||
key: make_sequence(self, exprs),
|
||||
value: make_node(AST_Function, self, {
|
||||
argnames: [],
|
||||
body: [],
|
||||
}).init_vars(node),
|
||||
}) ] : [];
|
||||
}));
|
||||
return node;
|
||||
}
|
||||
if (values) exprs.push(make_node(AST_Call, self, {
|
||||
|
||||
Reference in New Issue
Block a user