From e858144ddf1e50b3a390d33961945a9063d746f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Mon, 26 Dec 2022 22:07:29 -0300 Subject: Avoid preserving old definitions of json-value. Could cause me to find out real quick --- load.lisp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'load.lisp') diff --git a/load.lisp b/load.lisp index 80fef99..c8c1194 100644 --- a/load.lisp +++ b/load.lisp @@ -75,7 +75,7 @@ (fail "Expected 'null'.")))) 'null)) -(defvar json-value nil) +(defvar json-value) (defparameter json-array (comp ((_ (unit #\[)) @@ -101,17 +101,17 @@ (setf (gethash (car v) obj) (cdr v))) obj)))) -(setf json-value - (comp ((_ whitespace) - (v (one-of number-literal - string-literal - json-object - json-array - true-symbol - false-symbol - null-symbol)) - (_ whitespace)) - v)) +(defparameter json-value + (comp ((_ whitespace) + (v (one-of number-literal + string-literal + json-object + json-array + true-symbol + false-symbol + null-symbol)) + (_ whitespace)) + v)) (defun parse-string (str) (run json-value (input:from-string str))) -- cgit v1.2.3