Allen Wirfs-Brock wrote:
It may well be that the initial Expression of the ArrayComprehension productions should be an AssignmentExpression in order to avoid commas.

This is just a draft-spec grammar bug. What I implemented in SpiderMonkey many years ago is what is grammatically necessary: AssignmentExpression. Otherwise you have not only a readability problem as Jay wrote, but a real problem in top-down parsers deciding whether you are in an array initialiser or array comprehension. Bottom up parsers can cope but practical implementations are all top-down.

Jay, thanks for pointing this out.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to