clear source texts

This commit is contained in:
Ibraheem Ahmed 2025-06-18 23:10:12 -04:00
parent e352a50b74
commit d1f16703ab
25 changed files with 150 additions and 79 deletions

View file

@ -1,3 +1,4 @@
use std::borrow::Cow;
use std::cell::RefCell;
use std::cmp::Ordering;
use std::fmt::{Formatter, Write};
@ -519,8 +520,8 @@ impl SemanticSyntaxContext for SemanticSyntaxCheckerVisitor<'_> {
self.diagnostics.borrow_mut().push(error);
}
fn source(&self) -> &str {
self.source
fn source(&self) -> Cow<'_, str> {
Cow::Borrowed(self.source)
}
fn global(&self, _name: &str) -> Option<TextRange> {