Single destructuring argument to an arrow function

Kevin Smith zenparsing at
Sat Mar 21 04:38:36 UTC 2015

> But we could extend the cover grammar with some work. You'd have to push
> ArrayLiteral and ObjectLiteral down from PrimaryExpression alternative
> right-hand sides, to live under CoverParenthesizedExpressionAndArrowParameterList.Seems
> do-able -- anyone see a fatal problem?

Not for ES6 arrows, but it might be an issue for ES7-proposed async arrows:

    async [ a, b ] => { }
    async { a, b } => {}

Still technically do-able I think, but you'd have to cover bracketed member
expressions in addition to the identifier + arguments that we already need
to cope with.  (More cover grammars, belch...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list