fix(@babel/parser): fix tokenizer context update code#13422
fix(@babel/parser): fix tokenizer context update code#13422JLHwung merged 2 commits intobabel:mainfrom
@babel/parser): fix tokenizer context update code#13422Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/46691/ |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 42d35a8:
|
JLHwung
left a comment
There was a problem hiding this comment.
Good catch! We should add a test for this change.
While it is very likely to be a typo, I think we should add a test to actually cover this branch.
JLHwung
left a comment
There was a problem hiding this comment.
This change is not visible to users.
Before this PR, the first slash in { function x () {} /1/ } is tokenized as a slash (incorrect!) but later we are saved from the parser#parseExprAtom where we re-read as a regex token:
After this PR, such token is handled as regexp token in the first place. So this PR does not introduce changing behaviours.
|
I marked this PR as internal because of no visible behaviour changes. |
this will always be false since
b_statdoes not exist on thetypesobject. so instead oftypes.b_statusetypes.braceStatement