-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix parens issues with exponentiation in generator #5830
Conversation
Codecov Report
@@ Coverage Diff @@
## 7.0 #5830 +/- ##
==========================================
+ Coverage 85.09% 85.14% +0.04%
==========================================
Files 284 284
Lines 9911 9916 +5
Branches 2768 2772 +4
==========================================
+ Hits 8434 8443 +9
+ Misses 976 972 -4
Partials 501 501
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @rauschma
Just in case – all of these are syntax errors: +a ** b ** c;
+(a ** b) ** c;
+a.b ** c;
+(-a) ** b;
+a ** -b;
+(a * b) ** c;
+a ** (b * c); Source: packages/babel-generator/test/fixtures/parentheses/exponentiation/actual.js (If these are not already negative checks then they should probably become ones.) |
For syntax errors I believe we would just rely on the parser, don't think we need to duplicate because it would just be the same error |
I'll double check the exponentiation tests in babylon (though I think most of the error cases are there) |
/cc: @bakkot