Skip to content
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 issue to allow module block in member expression #13573

merged 8 commits into from Jul 19, 2021


Copy link

@nme077 nme077 commented Jul 19, 2021

Q                       A
Fixed Issues? Fixes #13533
Patch: Bug Fix? 👍
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? 👍
Documentation PR Link
Any Dependency Changes? No
License MIT

Moved the logic to check for module {} in babel-parser from Parser#parseMaybeUnary to Parser#parseExprAtom within the token.

Copy link

@babel-bot babel-bot commented Jul 19, 2021

Build successful! You can test your changes in the REPL here:

Copy link

@codesandbox codesandbox bot commented Jul 19, 2021

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 1c04552:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Copy link

@JLHwung JLHwung left a comment

Not a blocker: After this PR, we can further remove the module lookahead. Like how we are handling async function and async x =>, we can parse the module as an id and when we see a left curly brace, we can reuse the id node and then finished as a ModuleExpression.

Copy link

@nicolo-ribaudo nicolo-ribaudo commented Jul 19, 2021

Can you delete the package.tgz file? I think you added it by accident.

@JLHwung JLHwung mentioned this pull request Jul 19, 2021
6 tasks
Copy link
Contributor Author

@nme077 nme077 commented Jul 19, 2021

@nicolo-ribaudo done. I removed the package.tgz file.

@nme077 nme077 changed the title Fix issue to allow module block in member expression #13533 Fix issue to allow module block in member expression Jul 19, 2021
Copy link

@nicolo-ribaudo nicolo-ribaudo left a comment


Copy link

@JLHwung JLHwung commented Jul 19, 2021

The CI error is unrelated and has been fixed in #13567.

@JLHwung JLHwung merged commit 2c6db56 into babel:main Jul 19, 2021
24 of 27 checks passed
nicolo-ribaudo added a commit to nicolo-ribaudo/babel that referenced this issue Jul 30, 2021
* Accept module in primaryExpression

* Add module blocks to primaryExpression

* Fix package.json

* Fix yarn.lock

* Fix yarn.lock

* Remove package.tgz file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants