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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Error when parsing ternary inside parens with arrow functions when using Flow #13644
Comments
Another test case: (a ? (sum += 1) : v => 0 : any) It's a ternary type-casted to Also, Another one: |
Is there any possibility Flow/TypeScript fix their broken grammar? This mess is unsustainable. |
Flow's grammar is worse since is also has I also found another bug while fixing this: |
Can you share your lockfile? |
The fix was released in "@babel/parser": {
"version": "7.14.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.8.tgz",
"integrity": "sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA=="
}, and re-run |
Thank you @nicolo-ribaudo for responding. I did that, but it ended up having the exact same lines of codes. In other words, it again installed |
Could you try running |
Well, it seems that it was a cache problem. I completely removed |
馃捇
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
REPL
Configuration file name
No response
Configuration
No response
Current and expected behavior
It should be parsed successfully, but it throws.
Environment
@babel/parser
7.15.0Possible solution
No response
Additional context
Originally reported at #11038 (comment)
The text was updated successfully, but these errors were encountered: