diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-11 21:39:01 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-11 21:39:01 +0300 |
commit | 2e17ad5361a86d004ca48419a0f69f9c298ec1e1 (patch) | |
tree | 562b4735c164024e348fbf622e7b59319f0f0e35 /src/sexp/display.rs | |
parent | c2a293e46e6bf7563138ea852191ae70a7b7652e (diff) | |
download | myslip-2e17ad5361a86d004ca48419a0f69f9c298ec1e1.tar.gz myslip-2e17ad5361a86d004ca48419a0f69f9c298ec1e1.zip |
refactor: Added helper matches_pat for pattern matching
Diffstat (limited to 'src/sexp/display.rs')
-rw-r--r-- | src/sexp/display.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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(), |