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
Bug fix #6666 #6726
Bug fix #6666 #6726
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5611/ |
@@ -445,7 +446,7 @@ export default class Tokenizer extends LocationParser { | |||
type = tt.exponent; | |||
} | |||
|
|||
if (next === 61) { | |||
if (next === 61 && !exprAllowed) { |
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.
(This has nothing to do with your PR)
The char codes are very difficult to read to me since I need to lookup in the table. It's sometimes inconsistent between int or hex representation.
I would like to PR to add a constant file where the char codes are stored and replace every occurrence in Babylon. What do you think?
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.
This seems to be a good idea which will make the code readable. I'll make it is as a separate PR.
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.
I would wait for more thoughts about since, especially @danez which is the main contrib of the parse.
Actually I already started locally. I can push a PR today, we can also both work on it.
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.
good idea
@rajzshkr thanks! |
Edit by @nicolo-ribaudo:
Old PR: babel/babylon#778