-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Spreadoperator compliance in dict #2129
Comments
I am getting the same error. |
I´m using acorn now import * as acorn_walk from 'acorn-walk';
} plugins: [ |
This package worked perfectly for me. Thanks for pointing it out. |
Running a dict containing a Spreadoperator gives an error:
babel/parser.parse() on this :
const a = {'a':'b','b':'b','c':'c'};
const b = {'z':'z'};
const y = {...a,...b};
gives Following error:
Error: Line 3: Unexpected token ...
at ErrorHandler.constructError (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:5012:22)
at ErrorHandler.createError (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:5028:27)
at Parser.unexpectedTokenError (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:1985:39)
at Parser.throwUnexpectedToken (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:1995:21)
at Parser.parseObjectPropertyKey (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:2499:33)
at Parser.parseObjectProperty (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:2534:25)
at Parser.parseObjectInitializer (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:2602:35)
at Parser.inheritCoverGrammar (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:2285:37)
at Parser.parsePrimaryExpression (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:2354:38)
at Parser.inheritCoverGrammar (/Users/anton/Documents/firebase/NodeJs/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js:2285:37) {
index: 69,
lineNumber: 3,
description: 'Unexpected token ...'
}
The text was updated successfully, but these errors were encountered: