-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Babel 8] Remove decimal
from parser
#16741
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57826 |
9a16dc2
to
2e86def
Compare
Could we throw a more helpful error? Either in https://github.com/babel/babel/blob/main/packages/babel-parser/src/plugin-utils.ts when the plugin is enabled, or in the tokenizer when we see |
fd8fdd3
to
22ec593
Compare
"BABEL_8_BREAKING": true, | ||
"throws": "Identifier directly after number. (1:2)" | ||
} |
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.
Since Babel 8 no longer supports parsing 0.1m and it is not expected to throw missing plugin error, we can just remove this case.
@@ -26,6 +26,8 @@ if [ "$BABEL_8_BREAKING" = true ] ; then | |||
sed -i 's/const getChalk = () => chalk/default (code) => code/' scripts/build/shims/babel-highlight.js | |||
sed -i 's/const generate = babelGenerator.default/const generate = babelGenerator/' scripts/build/transform/index.js | |||
rm tests/unit/__snapshots__/visitor-keys.js.snap | |||
sed -i 's/"decimal",//' src/language-js/parse/babel.js | |||
rm tests/format/js/babel-plugins/decimal.js |
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 @fisker
5d54f64
to
152769a
Compare
I will open a follow up PR to remove AST.