Improved logic surrounding expansion of assignments

This commit is contained in:
2025-03-07 19:12:28 -05:00
parent fb0a3af428
commit 972e2ceefa
12 changed files with 154 additions and 92 deletions

View File

@@ -51,6 +51,11 @@ impl InputMan {
Rc::new(RefCell::new(Span::new(0,0)))
}
}
pub fn remove_span(&mut self, span: Rc<RefCell<Span>>) {
if let Some(idx) = self.spans.iter().position(|iter_span| *iter_span == span) {
self.spans.remove(idx);
}
}
pub fn spans_mut(&mut self) -> &mut Vec<Rc<RefCell<Span>>> {
&mut self.spans
}