google-code-export / esprima

Automatically exported from code.google.com/p/esprima
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Yield* should be considered reserved in generators and not leak multiplicative expressions #617

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

```javascript
function* foo() {
  return 1 + yield* 2;
}

What is the expected output?

Error, the right hand side of the + has no way to start with yield as a token. It is a multiplicative expression and yield is a reserved keyword inside of generators.

What do you see instead?

The right hand side becomes a MultiplicativeExpression

What version of the product are you using? On what operating system? Which browser?

Node 0.10.28 + regenerator

Please provide any additional information below.

see https://github.com/facebook/regenerator/issues/151 for details on why this is an error

Original issue reported on code.google.com by `Bradley....@gmail.com` on 12 Dec 2014 at 5:07
GoogleCodeExporter commented 9 years ago
Folded into the new issue https://github.com/jquery/esprima/issues/1033.

Original comment by ariya.hi...@gmail.com on 14 Feb 2015 at 10:06