IsValidSimpleAssignmentTarget with parenthesized LHS expressions

Kevin Gibbons kevin at shapesecurity.com
Tue May 9 20:19:12 UTC 2017


Your reading of the spec is correct; `({x}) = 1` is disallowed. And indeed
every major engine disallows it.

Esprima just has a bug. See e.g.
https://github.com/jquery/esprima/issues/1164.

Shift gets this; so do acorn and babylon
<https://astexplorer.net/#/gist/e8ff5de6b9c8c56e00b6b654cc84a0f9/7ef6401d8b4ce934da425095c8662637edf6707e>
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170509/4ff6a151/attachment.html>


More information about the es-discuss mailing list