src/pset-parse.lisp: Remove the pointless `flet' function.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 19 Aug 2019 19:48:41 +0000 (20:48 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 19 Aug 2019 19:48:41 +0000 (20:48 +0100)
It's only used once and doesn't achieve very much of use.

src/pset-parse.lisp

index 0f3e482..b0e22be 100644 (file)
 
     (with-parser-context (token-scanner-context :scanner scanner)
       (parse (expr (:nestedp nestedp)
-              (lisp (flet ((prop (type value)
-                             (scanner-step scanner)
-                             (values (cons type value) t t)))
-                      (case (token-type scanner)
-                        ((:int :id :char :string)
-                         (prop (token-type scanner)
-                               (token-value scanner)))
-                        (#\?
-                         (let* ((stream (make-scanner-stream scanner))
-                                (sexp (read stream t)))
-                           (scanner-step scanner)
-                           (multiple-value-bind (type value)
-                               (restart-case (decode-property (eval sexp))
-                                 (continue () (values :invalid nil)))
-                             (values (cons type value) t t))))
-                        (#\{
-                         (values (cons :fragment
-                                       (parse-delimited-fragment scanner
-                                                                 #\{ #\}))
-                                       t t))
-                        (#\<
-                         (parse (seq (#\<
-                                      (ds (parse-c-type scanner))
-                                      (dc (parse-declarator
-                                           scanner ds
-                                           :kernel (lambda ()
-                                                     (values nil t nil))
-                                           :abstractp t))
-                                      #\>)
-                                  (values (cons :type (car dc))
-                                          t t))))
-                        (t
-                         (values (list :int :id :char :string #\? #\{ #\<)
-                                 nil nil)))))
+              (lisp (case (token-type scanner)
+                      ((:int :id :char :string)
+                       (scanner-step scanner)
+                       (values (cons (token-type scanner)
+                                     (token-value scanner))
+                               t t))
+                      (#\?
+                       (let* ((stream (make-scanner-stream scanner))
+                              (sexp (read stream t)))
+                         (scanner-step scanner)
+                         (multiple-value-bind (type value)
+                             (restart-case (decode-property (eval sexp))
+                               (continue () (values :invalid nil)))
+                           (values (cons type value) t t))))
+                      (#\{
+                       (values (cons :fragment
+                                     (parse-delimited-fragment scanner
+                                                               #\{ #\}))
+                                     t t))
+                      (#\<
+                       (parse (seq (#\<
+                                    (ds (parse-c-type scanner))
+                                    (dc (parse-declarator
+                                         scanner ds
+                                         :kernel (lambda ()
+                                                   (values nil t nil))
+                                         :abstractp t))
+                                    #\>)
+                                (values (cons :type (car dc))
+                                        t t))))
+                      (t
+                       (values (list :int :id :char :string #\? #\{ #\<)
+                               nil nil))))
 
               ((:op #\* binop "*" (x y 7)
                     (dispatch "*" (list x y) (list :int #'* :int :int)))