(&mut self, span: Span, cursors: Vec<'a, SourceCursor<'a>>)
| 53 | } |
| 54 | |
| 55 | pub fn insert(&mut self, span: Span, cursors: Vec<'a, SourceCursor<'a>>) { |
| 56 | #[cfg(debug_assertions)] |
| 57 | { |
| 58 | let has_non_eof = cursors.iter().any(|cursor| cursor.token() != Kind::Eof); |
| 59 | debug_assert!(has_non_eof || cursors.is_empty(), "Overlay for span {:?} produced no output", span); |
| 60 | } |
| 61 | self.push_segment(OverlaySegment::new(span, cursors, OverlayKind::Replace)); |
| 62 | } |
| 63 | |
| 64 | pub fn clear(&mut self) { |
| 65 | self.segments.clear(); |