Skip to content

Commit ed52905

Browse files
committed
Flat COND instead of nested ELSE branches
- No need to nest in ELSE branch of COND/IF - intendation fixed
1 parent 1a0af15 commit ed52905

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

quicklisp/http.lisp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,23 @@
112112
(with-slots (pattern pos)
113113
matcher
114114
(loop
115-
(cond ((= pos match-end)
116-
(let ((match-start (- i pos)))
117-
(setf pos 0)
118-
(setf (matchedp matcher) t)
119-
(return (values match-start (+ match-start match-end)))))
120-
((= i end)
121-
(return nil))
122-
((= (aref pattern pos)
123-
(aref input i))
124-
(incf i)
125-
(incf pos))
126-
(t
127-
(if error
128-
(error 'match-failure)
129-
(if (zerop pos)
130-
(incf i)
131-
(setf pos 0)))))))))
115+
(cond ((= pos match-end)
116+
(let ((match-start (- i pos)))
117+
(setf pos 0)
118+
(setf (matchedp matcher) t)
119+
(return (values match-start (+ match-start match-end)))))
120+
((= i end)
121+
(return nil))
122+
((= (aref pattern pos)
123+
(aref input i))
124+
(incf i)
125+
(incf pos))
126+
(error
127+
(error 'match-failure))
128+
((zerop pos)
129+
(incf i))
130+
(t
131+
(setf pos 0)))))))
132132

133133
(defun ascii-matcher (string)
134134
(make-instance 'matcher

0 commit comments

Comments
 (0)