Issue Description
finish_if may call finish_node multiple times for the same position.
Verify that handling multiple spans ending at the same position does not cause panics or corrupt the tree structure.
Location
src/parser/cst_builder/tree.rs:38
Code Context
fn finish_if(&mut self, builder: &mut GreenNodeBuilder, pos: usize) {
if matches!(self.iter.peek(), Some(s) if pos >= s.end) {
builder.finish_node();
References
Issue Description
finish_if may call finish_node multiple times for the same position.
Verify that handling multiple spans ending at the same position does not cause panics or corrupt the tree structure.
Location
src/parser/cst_builder/tree.rs:38Code Context
References