diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-06 17:05:55 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-06 17:05:55 +0300 |
commit | 3e1bf7f9946efe70d452c71494ac77ed39110804 (patch) | |
tree | f7682f538db9d8b77890e8c0e9c54eb2968d4388 /src/sexp/util.rs | |
parent | 313c044b4a878a425aaca6554576f5154ace8ff9 (diff) | |
download | myslip-3e1bf7f9946efe70d452c71494ac77ed39110804.tar.gz myslip-3e1bf7f9946efe70d452c71494ac77ed39110804.zip |
Added print, raised level on which UnboundGeneric error is returned
Diffstat (limited to 'src/sexp/util.rs')
-rw-r--r-- | src/sexp/util.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sexp/util.rs b/src/sexp/util.rs index a28aaad..507455f 100644 --- a/src/sexp/util.rs +++ b/src/sexp/util.rs @@ -86,4 +86,11 @@ impl SExp { _ => None } } + + pub fn is_print(&self) -> bool { + match self { + SCons(op, _) if **op == Atom(Print) => true, + _ => false + } + } } |