Closed fw-immunant closed 1 year ago
We create the root span as such:
let file_span = Span::new(file.start_pos, file.end_pos, SyntaxContext::root(), None);
So we have to subtract start_pos correspondingly from each bound when using subspans to index into the file contents as their own slice.
start_pos
I can't easily push a test case for this, but ran into crashes and wrong output locally.
We create the root span as such:
So we have to subtract
start_pos
correspondingly from each bound when using subspans to index into the file contents as their own slice.I can't easily push a test case for this, but ran into crashes and wrong output locally.