Fix computed getters + cleanup AST
This commit is contained in:
@@ -1457,7 +1457,13 @@ function OutputStream(options) {
|
||||
}
|
||||
output.print("set");
|
||||
output.space();
|
||||
self.key.print(output);
|
||||
if (self.key instanceof AST_SymbolMethod) {
|
||||
self.key.print(output);
|
||||
} else {
|
||||
output.with_square(function() {
|
||||
self.key.print(output);
|
||||
});
|
||||
}
|
||||
self.value._do_print(output, true);
|
||||
});
|
||||
DEFPRINT(AST_ObjectGetter, function(self, output){
|
||||
@@ -1467,7 +1473,13 @@ function OutputStream(options) {
|
||||
}
|
||||
output.print("get");
|
||||
output.space();
|
||||
self.key.print(output);
|
||||
if (self.key instanceof AST_SymbolMethod) {
|
||||
self.key.print(output);
|
||||
} else {
|
||||
output.with_square(function() {
|
||||
self.key.print(output);
|
||||
});
|
||||
}
|
||||
self.value._do_print(output, true);
|
||||
});
|
||||
DEFPRINT(AST_ObjectComputedKeyVal, function(self, output) {
|
||||
@@ -1493,15 +1505,6 @@ function OutputStream(options) {
|
||||
self.default.print(output)
|
||||
}
|
||||
});
|
||||
DEFPRINT(AST_SymbolMethod, function(self, output) {
|
||||
if (self.name instanceof AST_Node) {
|
||||
output.with_square(function() {
|
||||
self.name.print(output);
|
||||
});
|
||||
} else {
|
||||
self._do_print(output);
|
||||
}
|
||||
});
|
||||
DEFPRINT(AST_Undefined, function(self, output){
|
||||
output.print("void 0");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user