tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit fe7d2fd10e29b176370e9a9ebc066d4365ca1c1e
parent 654a1f121611287bd4ae51b72d8b1b75de9b60ed
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Wed, 24 Oct 2018 16:00:42 -0700

Return nil, not symbol, when parsing empty string

Diffstat:
tisp.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/tisp.c b/tisp.c @@ -445,6 +445,8 @@ Val tisp_read(Env env, Str str) { skip_ws(str); + if (strlen(str->d) == 0) + return env->nil; if (isdigit(*str->d) || ((*str->d == '-' || *str->d == '+') && isdigit(str->d[1]))) return read_num(str); if (*str->d == '"')