Use Spanned trait to simplify logic#5529
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#use-built-in-spansNotice: Ensure you have installed Rust nightly. If you haven't installed it yet, please first see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust, then see https://rust-lang.github.io/rustup/concepts/channels.html to learn how to install Rust nightly. or load it into the REPL: |
Performance report!Rough benchmark
Internal benchmark
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5529 +/- ##
=======================================
Coverage 98.81% 98.81%
=======================================
Files 238 238
Lines 9544 9544
Branches 2439 2439
=======================================
Hits 9431 9431
Misses 48 48
Partials 65 65 ☔ View full report in Codecov by Sentry. |
|
This PR has been released as part of rollup@4.18.1. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
I discovered that most of the enums implement a Spanned trait that provides derived positions for the SWC AST enums. Using this, we can simplify the logic in some places.