From 34074287861b3ef6c9ee89195056d20ae1603cfc Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 26 Jul 2025 18:34:44 +0300 Subject: Added variables and tests for their substitution --- src/sexp/util.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sexp/util.rs') diff --git a/src/sexp/util.rs b/src/sexp/util.rs index c31358f..ce6de5d 100644 --- a/src/sexp/util.rs +++ b/src/sexp/util.rs @@ -25,3 +25,8 @@ impl From for SLeaf { pub fn scons(x: impl Into>, y: impl Into>) -> SExp { SCons(x.into(), y.into()) } + +pub fn var(name: &str) -> SExp { + Atom(Var(name.to_string())) +} + -- cgit v1.2.3