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

Refactor import and export parsing #9326

Merged

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Jan 13, 2019

Q                       A
License MIT

While experimenting with #9112, I found out that I needed to hook into some parts of import/export parsing to disambiguate, for example export %%FOO%% and export %%FOO%% from "path".
Since I'm working on #9112 using a plugin in a separate file (like we do for JSX or Flow), I can only replace logic overriding methods. With those monolithic parseExport/parseImport functions it is impossible without duplicating a lot of logic: for this reason I has to split them into multiple parts. While I was there, I fixed flow typings as noted in a comment before the parseExport function.

I'm not putting this changes in the PR I'm preparing for placeholders because they are not strictly related.

@babel-bot
Copy link
Collaborator

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

@nicolo-ribaudo
Copy link
Member Author

The actual placeholders (which depend on this PR) are implemented at nicolo-ribaudo/babel@placeholders/refactor-import-export...nicolo-ribaudo:placeholders/1-parser

@nicolo-ribaudo
Copy link
Member Author

nicolo-ribaudo commented Jan 22, 2019

These commits are also included in #9364, which has already been approved by Daniel.

@nicolo-ribaudo nicolo-ribaudo merged commit 65febdd into babel:master Jan 22, 2019
@nicolo-ribaudo nicolo-ribaudo deleted the placeholders/refactor-import-export branch January 22, 2019 18:53
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: modules outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants