another tweak to eval/quote equivalency, more tests

This commit is contained in:
Ava Apples Affine 2023-06-08 17:11:10 -07:00
parent 33791c7f3b
commit 0a01f9178c
3 changed files with 42 additions and 57 deletions

View file

@ -151,20 +151,19 @@ impl SymTable {
},
Ctr::Symbol(ref s) if self.is_function_type(s).is_some()
&& self.is_function_type(s).unwrap() => {
symbol = match self.remove(s) {
Some(sym) => sym,
None => return Err(
Traceback::new().with_trace(
(name, format!("(references undefined symbol {})", s))
.into())),
};
symbol.__generation -= 1;
self.insert(symbol.name.clone(), symbol.clone());
},
symbol = match self.remove(s) {
Some(sym) => sym,
None => return Err(
Traceback::new().with_trace(
(name, format!("(references undefined symbol {})", s))
.into())),
};
symbol.__generation -= 1;
self.insert(symbol.name.clone(), symbol.clone());
},
_ => return Ok(val.clone()),
}
}
if call_func {
symbol.call(args, self)
} else {