On 2015/05/18 13:13:44, Dmitry Lomov (chromium) wrote:
On 2015/05/18 13:06:08, wingo wrote:
> On 2015/05/18 12:30:14, Dmitry Lomov (chromium) wrote:
> > PTAL. This is based on https://codereview.chromium.org/1139773005/
>
> Very nicely done! LGTM. Not sure what to do about duplicate
identifiers in
the
> pre-parser though; any idea? E.g. "let { x, x } = y".
My understanding is that { x, x } is a valid pattern.
var { x, x } = {} is completely ok.
let { x, x } = {} fails later on when you try to declare two lexical
bindings
with the same name.
Right. But "later on" is still early:
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-let-and-const-declarations-static-semantics-early-errors
So e.g. function foo() { var {x,x} = {} } should signal an early error,
even if
foo() is never run and only parsed by the preparser.
Similarly, ({x,x})=>34 is an early error -- not the same productions, but
similar needs.
https://codereview.chromium.org/1146683002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.