diff options
-rw-r--r-- | json.lisp | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,6 +1,6 @@ (in-package #:json) -(defparameter number-parser +(defparameter number-literal (let ((signed-digits (comp ((sign (zero-or-one (unit (lambda (x) (or (char= x #\-) (char= x #\+)))))) @@ -21,8 +21,8 @@ nothing))) (list 'number base fraction exponent)))) -(defparameter string-parser - (comp ((start (unit (lambda (x) (char= x #\")))) +(defparameter string-literal + (comp ((_ (unit (lambda (x) (char= x #\")))) (chars (zero-or-more (either (comp ((slash (unit (lambda (x) (char= x #\\)))) (escaped (unit)) (codepoints (if (and escaped (char= escaped #\u)) @@ -46,11 +46,11 @@ codepoints) (t escaped))) (unit (lambda (x) (char/= x #\")))))) - (end (unit (lambda (x) (char= x #\"))))) + (_ (unit (lambda (x) (char= x #\"))))) (list 'string chars))) -(defparameter whitespace-parser - (comp ((whitespace (zero-or-more (unit (lambda (x) (or (char= x #\Space) - (char= x #\Newline) - (char= x #\Tab))))))) +(defparameter whitespace + (comp ((_ (zero-or-more (unit (lambda (x) (or (char= x #\Space) + (char= x #\Newline) + (char= x #\Tab))))))) nil)) |