Fix some read errors

This commit is contained in:
2025-09-24 22:27:43 -07:00
parent 9c7eee0266
commit 5ad4e054e0
2 changed files with 6 additions and 0 deletions

View File

@ -444,3 +444,6 @@
(t (print obj)))
(when newline
(println)))
(breakpoint)
'

View File

@ -486,6 +486,9 @@ static LispVal *read_internal(struct ReadState *state) {
case '\'': {
popc(state); // '
LispVal *tail = read_internal(state);
if (!tail) {
READ_ERROR(state, 1, "quote not quoting anything");
}
LispVal *res = Fpair(Qquote, Fpair(tail, Qnil));
refcount_unref(tail);
refcount_unref(TAIL(res));