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

@@ -76,11 +76,11 @@ fn collect_consts_rec<N: NameLike>(
match &entry.member {
ModMember::Item(expr) => {
let mut name = path.iter().rev_vec_clone();
name.push(*key);
name.push(key.clone());
bag.insert(i.i(&name), expr.clone());
},
ModMember::Sub(module) =>
collect_consts_rec(path.push(*key), bag, module, i),
collect_consts_rec(path.push(key.clone()), bag, module, i),
}
}
}