diff --git a/crates/steel-core/src/parser/span_visitor.rs b/crates/steel-core/src/parser/span_visitor.rs index a0a5e5d1..0ea76e67 100644 --- a/crates/steel-core/src/parser/span_visitor.rs +++ b/crates/steel-core/src/parser/span_visitor.rs @@ -65,7 +65,12 @@ impl Visitor for CoalescingSpanVisitor { .iter() .map(|x| self.visit(x)) .collect::>(); - Span::coalesce_span(&span_vec) + + if span_vec.is_empty() { + l.location + } else { + Span::coalesce_span(&span_vec) + } } fn visit_vector(&self, l: &super::ast::Vector) -> Self::Output {