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

@@ -52,14 +52,14 @@ impl ProjectError for MissingSystemCode {
fn description(&self) -> &str {
"A system tried to import a path that doesn't exist"
}
fn message(&self, i: &Interner) -> String {
fn message(&self) -> String {
format!(
"Path {} is not defined by {} or any system before it",
i.extern_all(&self.path).join("::"),
Interner::extern_all(&self.path).join("::"),
self.system.join("::")
)
}
fn positions(&self, _i: &Interner) -> BoxedIter<ErrorPosition> {
fn positions(&self) -> BoxedIter<ErrorPosition> {
box_empty()
}
}