Permalink
Browse files

Slightly better behavior for clause-kinds parameter to UNPARSE.

  • Loading branch information...
1 parent 83a0931 commit 14388f506581d58e0e580d574a4f7e34ba5f38e5 @Hexstream committed Oct 26, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 parse.lisp
View
@@ -34,7 +34,12 @@
(funcall finish-key-value)
(funcall finish-extras))))
+;; clause-kinds should get some sanity checks...
(defun unparse (from to limit-kind by direction &key clause-kinds)
+ (setf clause-kinds
+ (ecase (length clause-kinds)
+ ((0 1) '(:from :to :by))
+ ((2 3) clause-kinds)))
(multiple-value-bind (from-keyword to-keyword)
(flags-to-keywords direction limit-kind)
;; Backquote indented badly...

0 comments on commit 14388f5

Please sign in to comment.