support rest parameters (#4515)
This commit is contained in:
@@ -119,6 +119,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
|
||||
node.argnames.forEach(function(argname) {
|
||||
argname.walk(tw);
|
||||
});
|
||||
if (node.rest) node.rest.walk(tw);
|
||||
walk_body(node, tw);
|
||||
});
|
||||
return true;
|
||||
@@ -220,6 +221,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
|
||||
node.argnames.forEach(function(argname) {
|
||||
argname.walk(tw);
|
||||
});
|
||||
if (node.rest) node.rest.walk(tw);
|
||||
in_arg.pop();
|
||||
if (node instanceof AST_Arrow && node.value) {
|
||||
node.value.walk(tw);
|
||||
|
||||
Reference in New Issue
Block a user