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
merged 8 commits into from Jul 19, 2021
Merged

Conversation

@nme077
Copy link
Contributor

@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 tt.name token.

@babel-bot
Copy link
Collaborator

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

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/47410/

@codesandbox
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
Contributor

@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.

@nicolo-ribaudo
Copy link
Member

@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
@nme077
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
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Thanks!

@JLHwung
Copy link
Contributor

@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants