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:
@@ -40,7 +40,8 @@ fn collect_paths_cls_rec(
|
||||
|
||||
pub fn clause(cls: &postmacro::Clause) -> interpreted::Clause {
|
||||
match cls {
|
||||
postmacro::Clause::Constant(name) => interpreted::Clause::Constant(*name),
|
||||
postmacro::Clause::Constant(name) =>
|
||||
interpreted::Clause::Constant(name.clone()),
|
||||
postmacro::Clause::P(p) => interpreted::Clause::P(p.clone()),
|
||||
postmacro::Clause::Apply(f, x) =>
|
||||
interpreted::Clause::Apply { f: expr(f.as_ref()), x: expr(x.as_ref()) },
|
||||
|
||||
Reference in New Issue
Block a user