diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-12-26 22:07:29 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-12-26 22:07:29 -0300 |
commit | e858144ddf1e50b3a390d33961945a9063d746f0 (patch) | |
tree | b63636e6c10dde3a6e1f7dc0baaf517632257f3a /load.lisp | |
parent | 2990f8c72975eb1de8be62ac043375fea47857eb (diff) | |
download | json-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.lisp | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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))) |