ECMA-262: ElementList : ... AssignmentExpression? Wtf?

Logan Smyth loganfsmyth at
Mon Oct 30 18:58:52 UTC 2017

Assuming I'm following your question, it seems like the confusion here is
that `AssignmentExpression`, name-wise, seems like it is only for
assignment, but in reality most of the other expression grammars are nested
inside it? If you look at you can
see for instance

 [image: Inline image 1]

and the `ConditionalExpression` drills down even further, eventually
reaching all of the normal "expression" types that you'd expect in JS.

`AssignmentExpression` in the ECMAScript grammar essentially translates to
"any expression except comma expressions.

On Sun, Oct 29, 2017 at 7:53 PM, Brendan Eich <brendan.eich at>

> Expression is .comma expression so can't be used without fatal ambiguity:
> is [a,,b] [(a,b)] or [(a), (b)]? It's the latter by using
> AssignmentExpression. If it were PrimaryExpression, ever expression using a
> binary operator would need to be parenthesized.
> Is the "Dragon Book" still in print? Recommended.
> /be
> On Sun, Oct 29, 2017 at 5:49 AM Uncloud Group <hydroperhh at>
> wrote:
>> The first example was meant to be [ a, b ]. Sorry.
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-10-30 at 11.54.52 AM.png
Type: image/png
Size: 157164 bytes
Desc: not available
URL: <>

More information about the es-discuss mailing list