Removal of NoIn grammar productions and for-loop parsing

Allen Wirfs-Brock allen at
Tue Sep 3 10:45:21 PDT 2013

On Sep 1, 2013, at 7:42 PM, Brendan Eich wrote:

> ...
> Ambiguity is not a matter of preference. We need to validate the ES6 grammar. Until then, please put back the NoIn productions. They were not there only because of the silly and unwanted initialiser option for 'for (var x = y of z)'. They were there because for-in and for(;;) have prefixes in common up to arbitrary lookahead.

Yup, we went off-track on this at the meeting.  But Waldemar's point about arrow functions is still valid.  We are going to need to have ArrowFunctionNoIn to disallow things like:

for (f = x => x in foo;;)


More information about the es-discuss mailing list