oxc icon indicating copy to clipboard operation
oxc copied to clipboard

Introduce `visit_span` on `VisitMut` and `Visit`

Open hyf0 opened this issue 6 months ago • 10 comments

Rolldown currently uses Spans as the way to identifier ast nodes. But it would become a problem, if the ast contains duplicate Spans.

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.

hyf0 avatar Aug 10 '24 07:08 hyf0