Skip to content

Commit

Permalink
parse as empty list when we empty the list
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-o-how committed Jan 15, 2025
1 parent 4434dd5 commit 21ef1d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/serde/de_br.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ pub fn traverse_path_with_vec(
// we have traversed right ("rest"), so we keep processing the Vec
// pop from the stack
if arg_index == 0 {
return Err(EvalErr(sexp_to_parse, "reference not in stack".into()).into());
// if we have reached the end of the stack, we must start parsing as NIL
parsing_sexp = true;
} else {
arg_index -= 1;
}
arg_index -= 1;
} else {
// we have traversed left (i.e "first" rather than "rest") so we must process as SExp now
parsing_sexp = true;
Expand Down

0 comments on commit 21ef1d9

Please sign in to comment.