@@ -120,29 +120,29 @@ OPTIONS is an association list. See `parseclj-parse' for more information
120120on available options."
121121 (let* ((pos (map-elt opening-token :pos ))
122122 (type (parseclj-lex-token-type opening-token))
123- (type (cl-case type
124- ( :lparen :list )
125- ( :lbracket :vector )
126- ( :lbrace :map )
127- (t type))))
128- (cl-case type
129- ( :root (cons (parseclj-ast-node :root pos :children children) stack))
130- ( :discard stack)
131- ( :tag (cons (parseclj-ast-node :tag
132- pos
133- :tag (intern (substring (map-elt opening-token :form ) 1 ))
134- :children children)
135- stack))
136- ( :metadata (cons (parseclj-ast-node :with-meta
137- pos
138- :children children)
139- stack))
140- ( :map-prefix (cons (parseclj-alist-assoc (car children)
141- :map-prefix opening-token)
142- stack))
143- (t (cons
144- (parseclj-ast-node type pos :children children)
145- stack)))))
123+ (type (cond
124+ (( eq :lparen type) :list )
125+ (( eq :lbracket type) :vector )
126+ (( eq :lbrace type) :map )
127+ (t type))))
128+ (cond
129+ (( eq :root type) (cons (parseclj-ast-node :root pos :children children) stack))
130+ (( eq :discard type) stack)
131+ (( eq :tag type) (cons (parseclj-ast-node :tag
132+ pos
133+ :tag (intern (substring (map-elt opening-token :form ) 1 ))
134+ :children children)
135+ stack))
136+ (( eq :metadata type) (cons (parseclj-ast-node :with-meta
137+ pos
138+ :children children)
139+ stack))
140+ (( eq :map-prefix type) (cons (parseclj-alist-assoc (car children)
141+ :map-prefix opening-token)
142+ stack))
143+ (t (cons
144+ (parseclj-ast-node type pos :children children)
145+ stack)))))
146146
147147(defun parseclj-ast--reduce-branch-with-lexical-preservation (stack opening-token children options )
148148 " Reduce STACK with an AST branch node representing a collection of elements.
@@ -176,12 +176,12 @@ on available options."
176176(defun parseclj-ast--unparse-collection (node )
177177 " Insert a string representation of the given AST branch NODE into buffer."
178178 (let* ((token-type (parseclj-ast-node-type node))
179- (delimiters (cl-case token-type
180- ( :root (cons " " " " ))
181- ( :list (cons " (" " )" ))
182- ( :vector (cons " [" " ]" ))
183- ( :set (cons " #{" " }" ))
184- ( :map (cons " {" " }" )))))
179+ (delimiters (cond
180+ (( eq :root token-type) (cons " " " " ))
181+ (( eq :list token-type) (cons " (" " )" ))
182+ (( eq :vector token-type) (cons " [" " ]" ))
183+ (( eq :set token-type) (cons " #{" " }" ))
184+ (( eq :map token-type) (cons " {" " }" )))))
185185 (insert (car delimiters))
186186 (let ((nodes (alist-get ':children node)))
187187 (when-let (node (car nodes))
0 commit comments