summaryrefslogtreecommitdiff
path: root/load.lisp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2022-12-26 22:07:29 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2022-12-26 22:07:29 -0300
commite858144ddf1e50b3a390d33961945a9063d746f0 (patch)
treeb63636e6c10dde3a6e1f7dc0baaf517632257f3a /load.lisp
parent2990f8c72975eb1de8be62ac043375fea47857eb (diff)
downloadjson-e858144ddf1e50b3a390d33961945a9063d746f0.tar.gz
json-e858144ddf1e50b3a390d33961945a9063d746f0.zip
Avoid preserving old definitions of json-value. Could cause me to find out real quick
Diffstat (limited to 'load.lisp')
-rw-r--r--load.lisp24
1 files changed, 12 insertions, 12 deletions
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)))