computed properties

This commit is contained in:
Fábio Santos
2015-09-07 22:46:07 +01:00
parent b14496c742
commit b31918bbf0
5 changed files with 42 additions and 0 deletions

View File

@@ -1203,6 +1203,13 @@ function OutputStream(options) {
self.key.print(output);
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);
});
DEFPRINT(AST_Symbol, function(self, output){
var def = self.definition();
output.print_name(def ? def.mangled_name || def.name : self.name);