From 921046e886a3ab0677d2627e8628cdfafbf22bcb Mon Sep 17 00:00:00 2001 From: bakaq Date: Thu, 28 Dec 2023 14:58:23 -0300 Subject: [PATCH] Parse as much of a list as possible as a partial string #1404 --- src/parser/parser.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index de2b04a0..473cbe46 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -97,7 +97,12 @@ pub(crate) fn as_partial_string( string.push(*c); } _ => { - return Err(Term::Cons(Cell::default(), Box::new(head), orig_tail)); + tail = Term::Cons( + Cell::default(), + Box::new((**prev).clone()), + Box::new((**succ).clone()), + ); + break; } } -- 2.54.0