feat: stack var (WIP)

This commit is contained in:
2025-08-09 08:12:53 +08:00
parent fd182b6233
commit d8ad7fe904
36 changed files with 1521 additions and 1058 deletions

View File

@@ -191,9 +191,9 @@ pub enum Value {
/// A function (lambda).
Func,
/// A primitive (built-in) operation.
PrimOp(&'static str),
PrimOp,
/// A partially applied primitive operation.
PrimOpApp(&'static str),
PrimOpApp,
/// A marker for a value that has been seen before during serialization, to break cycles.
/// This is used to prevent infinite recursion when printing or serializing cyclic data structures.
Repeated,
@@ -209,8 +209,8 @@ impl Display for Value {
List(x) => write!(f, "{x}"),
Thunk => write!(f, "<CODE>"),
Func => write!(f, "<LAMBDA>"),
PrimOp(x) => write!(f, "<PRIMOP {x}>"),
PrimOpApp(x) => write!(f, "<PRIMOP-APP {x}>"),
PrimOp => write!(f, "<PRIMOP>"),
PrimOpApp => write!(f, "<PRIMOP-APP>"),
Repeated => write!(f, "<REPEATED>"),
}
}