An Arrow Parsing Edge Case

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Mar 21 10:24:09 PDT 2014


On Mar 21, 2014, at 7:14 AM, Kevin Smith wrote:

> 
> `yield` is a keyword inside `function*` whether you're in strict or
> non-strict code.
> 
>  Right, but not within the body of nested arrow functions:
> 
>     function* g() { () => { var yield; } }
> 
> IIUC, this would parse fine.  So I'm asking whether a "yield" in the token stream for an arrow parameter list should be interpreted as a keyword or an identifier when we do the rewind/transform dance.

See bug https://bugs.ecmascript.org/show_bug.cgi?id=2504 

My current spec draft disallows 'yield' as a arrow function parameter when the arrow function is directly within a generator function.

Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140321/7dd6715d/attachment.html>


More information about the es-discuss mailing list