Converted Interner to work with Rc-s

- Interner no longer contains unsafe code
- Tokens now hold a reference to the value they represent directly

This will enable many future improvements
This commit is contained in:
2023-08-19 14:03:05 +01:00
parent ab0b57b1b8
commit 0b887ced70
62 changed files with 592 additions and 762 deletions

View File

@@ -16,13 +16,13 @@ impl ProjectError for VisibilityMismatch {
fn description(&self) -> &str {
"Some occurences of a namespace are exported but others are not"
}
fn message(&self, i: &Interner) -> String {
fn message(&self) -> String {
format!(
"{} is opened multiple times with different visibilities",
i.extern_all(&self.namespace).join("::")
Interner::extern_all(&self.namespace).join("::")
)
}
fn one_position(&self, _i: &Interner) -> Location {
fn one_position(&self) -> Location {
Location::File(self.file.clone())
}
}