An Arrow Parsing Edge Case

Kevin Smith zenparsing at gmail.com
Thu Mar 20 14:37:01 PDT 2014


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140320/52415ba7/attachment.html>


More information about the es-discuss mailing list