diff options
| author | Daniel Cerqueira <dan.git@lispclub.com> | 2026-08-25 18:04:24 +0100 |
|---|---|---|
| committer | Daniel Cerqueira <dan.git@lispclub.com> | 2026-08-25 18:16:02 +0100 |
| commit | b70032d94f0f93537fe61e22521d09886ab37012 (patch) | |
| tree | 22e1249934f7f6bcdda06e676007ab1f4880b5f6 /liblali.c | |
| parent | 805caa0211e590d333e05b3e79b8fec2a1c0980e (diff) | |
fix bug of ' or / with a space
Diffstat (limited to 'liblali.c')
| -rw-r--r-- | liblali.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |
