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
feat(traverse): CombinedTraverse
type to compose Traverse
s
#3219
feat(traverse): CombinedTraverse
type to compose Traverse
s
#3219
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @overlookmotel and the rest of your teammates on Graphite |
CodSpeed Performance ReportMerging #3219 will not alter performanceComparing Summary
|
Can we combine multiple Traversers ( >2 )? |
Yes! let all_five = combine_traverses!(
MyTraverse1::new(),
MyTraverse2::new(),
MyTraverse3::new(),
MyTraverse4::new(),
MyTraverse5::new(),
); oxc/crates/oxc_traverse/src/lib.rs Lines 210 to 287 in 2ff2eb8
|
Crazy! Let's hop on a call every time we gonna add 3000 lines of code 😛 |
Can I take that as "no way we're going to merge this nonsense"? Well I did say "I am actually not sure if this is a good idea". It's just responding to Dunqing's request for a less verbose API in #3216. And the joy of codegens is it only takes about 20 mins to generate 3000 lines of code! 😂 |
2ff2eb8
to
2139fe7
Compare
2139fe7
to
16abdc7
Compare
Let's refine the infra once all tests passes so we have the whole picture of the current infra. |
Implements the
CombinedTraverse
type discussed in #3216 (comment). This type and the accompanyingcombine_traverses!
macro allow composing multiple traverses/transforms with minimal boilerplate.I am actually not sure if this is a good idea or not. The API is nice I think, but it may blow up compile times.