Bug Report
Current Behavior
A clear and concise description of the behavior.
The following snippet will throw SyntaxError: Unexpected token, expected ","
Input Code
- REPL or Repo link if applicable: REPL
({ a = 42, b: {}.d } = {})
Expected behavior/code
It should parse successfully.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc): No plugin.
Environment
REPL
Possible Solution
We may reset refExpressionErrors.shortAssign when parsing Assignment Expression after eating tt.colon in parseObjectProperty.
|
: this.parseMaybeAssign(false, refExpressionErrors); |
Bug Report
Current Behavior
A clear and concise description of the behavior.
The following snippet will throw SyntaxError: Unexpected token, expected ","
Input Code
Expected behavior/code
It should parse successfully.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc): No plugin.
Environment
REPL
Possible Solution
We may reset
refExpressionErrors.shortAssignwhen parsing Assignment Expression after eatingtt.coloninparseObjectProperty.babel/packages/babel-parser/src/parser/expression.js
Line 1732 in bfb82e7