From b70032d94f0f93537fe61e22521d09886ab37012 Mon Sep 17 00:00:00 2001 From: Daniel Cerqueira Date: Tue, 25 Aug 2026 18:04:24 +0100 Subject: fix bug of ' or / with a space --- liblali.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/liblali.c b/liblali.c index a73b004..4d7e354 100644 --- a/liblali.c +++ b/liblali.c @@ -643,11 +643,14 @@ Object *readList(Stream *stream, GC_PARAM) { Object *readExpr(Stream *stream, GC_PARAM) { for (;;) { int ch = readNext(stream); + int chTmp = 0; if (ch == EOF) return NULL; - else if (ch == '\'') + else if (ch == '\'' + && ((chTmp = streamPeek(stream)) == '(' || isSymbolChar(chTmp))) return readUnary(stream, "quote", GC_ROOTS); - else if (ch == '/' && !isspace(streamPeek(stream))) + else if (ch == '/' + && ((chTmp = streamPeek(stream)) == '(' || isSymbolChar(chTmp))) return readUnary(stream, "say", GC_ROOTS); else if (ch == '"') return readString(stream, GC_ROOTS); -- cgit