From 2e17ad5361a86d004ca48419a0f69f9c298ec1e1 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Mon, 11 Aug 2025 21:39:01 +0300 Subject: refactor: Added helper matches_pat for pattern matching --- src/sexp/display.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sexp/display.rs') diff --git a/src/sexp/display.rs b/src/sexp/display.rs index eff3904..9f54efe 100644 --- a/src/sexp/display.rs +++ b/src/sexp/display.rs @@ -25,11 +25,13 @@ impl fmt::Display for SLeaf { False => "false".to_string(), Int(x) => x.to_string(), Var(s) => s.to_string(), + RestPat(s) => format!("..{s}"), Quote => "quote".to_string(), Vector => "vector".to_string(), Print => "print".to_string(), Let => "let".to_string(), Fun => "fn".to_string(), + Case => "case".to_string(), Ty(t) => t.to_string(), Arr => "->".to_string(), Nil => "()".to_string(), -- cgit v1.2.3