An Arrow Parsing Edge Case

Jason Orendorff jason.orendorff at
Fri Mar 21 06:40:05 PDT 2014

`yield` is a keyword inside `function*` whether you're in strict or
non-strict code.

So that is a syntax error.


On Thu, Mar 20, 2014 at 4:37 PM, Kevin Smith <zenparsing at> wrote:
> Given the following edge case contained in non-strict code:
>     function* g() { (yield) => null }
> Is this a syntax error, or not?
> The sequence `(yield)` will successfully parse as a parenthesized
> expression.  If we re-parse as an arrow parameter list, do we view the
> "lexical token stream" as containing a yield keyword, or an identifier whose
> value is yield?
> _______________________________________________
> es-discuss mailing list
> es-discuss at

More information about the es-discuss mailing list