diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-14 14:02:27 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-14 14:02:27 +0300 |
commit | 907bd54d19f6bf14a130a136df6f37cc5d256468 (patch) | |
tree | 28e282e040d05f107833a48fa27e8498746dfbda /src/sexp | |
parent | 52263c39dd6006cce5fc938ec60751ab45b73f8b (diff) | |
download | myslip-907bd54d19f6bf14a130a136df6f37cc5d256468.tar.gz myslip-907bd54d19f6bf14a130a136df6f37cc5d256468.zip |
feat: parsing of new types (T, (int ...), (int bool)) etc. also fixed bug in into_type (it didn't handle lists recursively)
Diffstat (limited to 'src/sexp')
-rw-r--r-- | src/sexp/case.rs | 2 | ||||
-rw-r--r-- | src/sexp/step.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/sexp/case.rs b/src/sexp/case.rs index d78f7ad..40310e4 100644 --- a/src/sexp/case.rs +++ b/src/sexp/case.rs @@ -1,5 +1,5 @@ -use crate::sexp::{SExp, SExp::*, SLeaf::*, util::*}; +use crate::sexp::{SExp, SExp::*, SLeaf::*}; impl SExp { /** diff --git a/src/sexp/step.rs b/src/sexp/step.rs index bae47a5..d35c8af 100644 --- a/src/sexp/step.rs +++ b/src/sexp/step.rs @@ -368,7 +368,6 @@ impl SExp { let (scrutinee, patarms) = scons(op, l).check_case().unwrap(); if !scrutinee.is_value() { return Ok(SExp::back_to_case(scrutinee.step()?, patarms)); - // return scons(Case, scons(scrutinee.step()?)) } let scrutinee = match scrutinee { @@ -646,7 +645,7 @@ impl SExp { }, // Nil in list - SCons(op, l) if *op == Atom(Nil) => { + SCons(op, _) if *op == Atom(Nil) => { Ok(scons(Vector, Nil)) }, |