Non-destructuring default parameters
This commit is contained in:
committed by
Richard van Velzen
parent
7f3dbb6df7
commit
084437bc6d
@@ -1275,9 +1275,21 @@ function OutputStream(options) {
|
||||
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);
|
||||
AST_Symbol.DEFMETHOD("_do_print", function(output){
|
||||
var def = this.definition();
|
||||
output.print_name(def ? def.mangled_name || def.name : this.name);
|
||||
});
|
||||
DEFPRINT(AST_Symbol, function (self, output) {
|
||||
self._do_print(output);
|
||||
});
|
||||
DEFPRINT(AST_SymbolFunarg, function(self, output){
|
||||
self._do_print(output);
|
||||
if (self.default) {
|
||||
output.space();
|
||||
output.print('=');
|
||||
output.space();
|
||||
self.default.print(output)
|
||||
}
|
||||
});
|
||||
DEFPRINT(AST_ObjectSymbol, function(self, output){
|
||||
var name = self.mangled_key || self.symbol.name;
|
||||
|
||||
Reference in New Issue
Block a user