oxc
oxc copied to clipboard
Introduce `visit_span` on `VisitMut` and `Visit`
Rolldown currently uses Span
s as the way to identifier ast nodes. But it would become a problem, if the ast contains duplicate Span
s.
So
we could have a new ast pass the will fill up empty span and ensure the uniqueness. https://github.com/rolldown/rolldown/pull/1899#issuecomment-2274936578
I want to ensure the uniqueness of Span
of every node. So far if I want to do that with the VisitMut
, I have to enumerate ever node. But with visit_span
, it would be pretty easy.