cl-interpret: Environment/stack overhaul + Ref patterns

This commit is contained in:
2025-07-18 05:29:10 -04:00
parent e165e029dc
commit 8b0a122dfc
12 changed files with 1216 additions and 353 deletions

View File

@@ -78,7 +78,8 @@ impl Fold for ConstantFolder {
Ek::Unary(Unary { kind, tail }) => {
un_rule! (match (kind, self.fold_expr(*tail)) {
(Not, std::ops::Not::not, Int, Bool),
(Neg, std::ops::Not::not, Int, Bool),
(Neg, std::ops::Not::not, Bool),
(Neg, |i| -(i as i128) as u128, Int),
(Neg, |f| (-f64::from_bits(f)).to_bits(), Float),
(At, std::ops::Not::not, Float), /* Lmao */
})