On 2014/06/18 15:43:03, arv wrote:
On 2014/06/18 15:15:15, marja wrote:
> On 2014/06/18 15:08:02, marja wrote:
> > Hmm, though, detecting "eval" and such complicates the "is comma separated
> > parameter list" stuff a bit, I guess...
>
> Argh, and the fact that the function can declare itself strict complicates
this
> even further.
>
> We could maybe go with the approach that just says "invalid strict mode
> parameter list" if there is eval or such in it, without pointing to the
> location. rossberg@, would that be acceptable?
>
> Like this:
>
> (foo, bar, eval) => { "use strict"; }
> ^--------------^
> malformed strict mode parameter list

Arrow parameters are always strict:


http://people.mozilla.org/~jorendorff/es6-draft.html#sec-arrow-function-definitions

If this is a reasonable way of reporting errors, I can easily modify
the code I currently have to "bubble up" the bit in the code of
PreParserExpressions that are binary operations, and add a bit that
means "this binary expression is a valid arrow function parameter
list", without needing to tap into the scanner.

Finding duplicate parameter names would still be tricky, though.

https://codereview.chromium.org/160073006/

--
--
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.

Reply via email to