Starting destructuring.
This commit is contained in:
committed by
Richard van Velzen
parent
252fc65558
commit
32f76f7ff8
@@ -598,6 +598,17 @@ function OutputStream(options) {
|
||||
output.print_string(self.value, self.quote);
|
||||
output.semicolon();
|
||||
});
|
||||
|
||||
DEFPRINT(AST_Destructuring, function (self, output) {
|
||||
output.print(self.is_array ? "[" : "{");
|
||||
var first = true;
|
||||
self.names.forEach(function (name) {
|
||||
if (first) first = false; else { output.comma(); output.space(); }
|
||||
name.print(output);
|
||||
})
|
||||
output.print(self.is_array ? "]" : "}");
|
||||
})
|
||||
|
||||
DEFPRINT(AST_Debugger, function(self, output){
|
||||
output.print("debugger");
|
||||
output.semicolon();
|
||||
|
||||
Reference in New Issue
Block a user