-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser
Description
Bug Report
Current Behavior
The code yield new Foo() results in a syntax error:
SyntaxError: Unexpected token, expected ";"
Input Code
export function* test() {
yield new Foo();
}Expected behavior/code
I expect this valid code to parse successfully.
Babel Configuration (.babelrc, package.json, cli command)
This will fail with no configuration (ie. the default). I've also tried a few different combinations of presets/plugins to get this work but it always fails.
Environment
- Babel version(s): @babel/cli v7.2.0, @babel/parser v7.3.0
- Node/npm version: Node.js v11.6.0, NPM 6.6.0
- OS: MacOS 10.14.2
- Monorepo: no
- How you are using Babel: cli
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser