-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
perf(es/parser): Rewrite parser #9313
base: dev
Are you sure you want to change the base?
Conversation
|
Please be aware in oxc, there is a second ast pass for ast path, symbols and scopes to complete all syntax errors. We also use the latest conformance suite from https://github.com/tc39/test262, you may need to consider replacing the outdated one you are using. |
CodSpeed Performance ReportMerging #9313 will not alter performanceComparing Summary
|
Would be cool if there was a way for it to also produce a red green syntax tree to allow modifications to the code that preserves formatting. @Boshen Any thoughts on this? I personally have a lot of use cases where I need to parse some module and then transform the code. The problem is that with an AST, since it's lossy in terms of formatting, any transformations to the tree means that if you re-print it in the end you'd loose the formatting of the module. It'd be cool if it used a lossless syntax tree instead of an AST. |
CST is out of scope for swc / oxc. Take a look at https://crates.io/crates/biome_parser for CST. |
Yea I was aware of Biome's parser that's inspired by the Rust Analyzer's parser I guess. Thanks! |
bf593ca
to
1a989a0
Compare
Report too large to display inline |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is an install script?Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts. Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
Description:
I'm going to rewrite the ES parser of SWC because
Related issue (if exists):