Remove AST_ObjectComputedKeyVal

This commit is contained in:
Anthony Van de Gejuchte
2016-10-18 16:18:34 +02:00
committed by Richard van Velzen
parent b7bb706150
commit 7e80a979a7
4 changed files with 10 additions and 31 deletions

View File

@@ -1508,7 +1508,13 @@ function OutputStream(options) {
) {
self.print_property_name(self.key, self.quote, output);
} else {
self.print_property_name(self.key, self.quote, output);
if (!(self.key instanceof AST_Node) || self.key instanceof AST_Symbol) {
self.print_property_name(self.key, self.quote, output);
} else {
output.with_square(function() {
self.key.print(output);
});
}
output.colon();
self.value.print(output);
}
@@ -1559,19 +1565,6 @@ function OutputStream(options) {
}
self.value._do_print(output, true);
});
DEFPRINT(AST_ObjectComputedKeyVal, function(self, output) {
output.print("[");
self.key.print(output);
output.print("]:");
output.space();
self.value.print(output);
if (self.default) {
output.space();
output.print('=');
output.space();
self.default.print(output);
}
});
AST_Symbol.DEFMETHOD("_do_print", function(output){
var def = this.definition();
output.print_name(def ? def.mangled_name || def.name : this.name);