caitpotter88
|
dfce900d64
|
[es6] enable destructuring rest parameters
Originally, only BindingIdentifiers were a legal operand for the `...` ellipsis
in a function rest parameter. This has since changed, allowing the rest array
to be destructured.
The grammar is now the following:
```
FunctionRestParameter[Yield]:
BindingRestElement[?Yield]
BindingRestElement[Yield]:
... BindingIdentifier[?Yield]
... BindingPattern[?Yield]
```
*Spec change: d322357e6b
*TC39 Discussion: https://github.com/tc39/tc39-notes/blob/master/es7/2015-07/july-28.md#66-bindingrestelement-should-allow-a-bindingpattern-ala-assignmentrestelement
BUG=v8:4627, v8:2159
LOG=N
R=littledan@chromium.org, adamk@chromium.org, wingo@igalia.com, rossberg@chromium.org
Review URL: https://codereview.chromium.org/1532873004
Cr-Commit-Position: refs/heads/master@{#33192}
|
2016-01-08 20:22:52 +00:00 |
|