From: Mark Wooding Date: Mon, 19 Aug 2019 19:48:41 +0000 (+0100) Subject: src/pset-parse.lisp: Remove the pointless `flet' function. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/25ffaef064be85cad56848252cd46f202ddf31c4?hp=0ee8826a7359b1e1d2e594ca6bf429cb18494042 src/pset-parse.lisp: Remove the pointless `flet' function. It's only used once and doesn't achieve very much of use. --- diff --git a/src/pset-parse.lisp b/src/pset-parse.lisp index 0f3e482..b0e22be 100644 --- a/src/pset-parse.lisp +++ b/src/pset-parse.lisp @@ -66,40 +66,39 @@ (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)))