archives

« Bugzilla Issues Index

#4316 — 12.14.5 - Omitted Productions


Section 12.14.5 Destructuring Assignment lists the valid productions for ArrayAssignmentPattern as:

> ArrayAssignmentPattern[Yield] :
> [ Elisionopt AssignmentRestElement[?Yield]opt ]
> [ AssignmentElementList[?Yield] ]
> [ AssignmentElementList[?Yield] , Elisionopt AssignmentRestElement[?Yield]opt ]

However, 12.14.5.2 (Runtime Semantics: DestructuringAssignmentEvaluation) lists semantics for two additional productions, namely:

> ArrayAssignmentPattern : [ ]

and

> ArrayAssignmentPattern : [ Elision ]

The grammar initially defined in 12.14.5 should be updated to include these productions.


Those aren't "additional" productions, they're just two possible 'expansions' of the defining production you quoted. (Note that the first RHS has two optional symbols, and see section 5.1.5.)