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

Question on parser generated AST tree #590

Closed
3cp opened this issue Jan 17, 2020 · 3 comments
Closed

Question on parser generated AST tree #590

3cp opened this issue Jan 17, 2020 · 3 comments

Comments

@3cp
Copy link

3cp commented Jan 17, 2020

I try to evaluate swc parser to replace my usage of @babel/parser.

Is the AST compatible with @babel/parser result?

Also, @babel/parser has an estree plugin (which I use) to generate estree compatible AST tree. Does swc have something equivalent to produce estree output?

@kdy1
Copy link
Member

kdy1 commented Jan 17, 2020

Is the AST compatible with @babel/parser result?

It's similar, but not same. For example, swc's does not have LogicalExpression and it's part of BinaryExpression.
Note that typings for the ast are provided.

Also, @babel/parser has an estree plugin (which I use) to generate estree compatible AST tree. Does swc have something equivalent to produce estree output?

It does not currently. I'm not sure about roadmap here, but I think I would implement the feature.

@3cp
Copy link
Author

3cp commented Jan 17, 2020

Thx!

The other possible feature (that I would love to have) is #106 wasm build for npm package @swc/core. Because I would like to run in both nodejs and browser.

The swc performance is dope!

@kdy1 kdy1 closed this as completed Jan 21, 2020
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 28, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants