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; } }