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: use ParsedModule and improve MediaTypes enum #7456

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Sep 14, 2020

This PR introduced the ParsedModule abstraction which holds the entire state for a parsed module and moves all related code to ast.rs instead of the semi-cryptically named swc_utils.rs. This also improves and makes MediaType more idiomatic in Rust.

@kitsonk kitsonk mentioned this pull request Sep 14, 2020
13 tasks
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @kitsonk. I have only one nitpick - take it or leave it.

cli/tsc.rs Show resolved Hide resolved
cli/ast.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member

CC @kdy1 please take a look at cli/ast.rs - would ParsedModule be of interest to have it in SWC?

@bartlomieju
Copy link
Member

Seems to close #7168

@kitsonk
Copy link
Contributor Author

kitsonk commented Sep 14, 2020

@bartlomieju yes, closes #7168 and cleans up any "magical" logic we had to use.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, mainly because of ErrBox.
Except it, I think it would fit for high level api for swc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants