From: Daniel Gackle Date: Thu, 17 Sep 2009 23:47:52 +0000 (-0600) Subject: Added &OPTIONAL to DESTRUCTURING-BIND. Currently it's just ignored (next step woudl... X-Git-Url: https://git.hcoop.net/clinton/parenscript.git/commitdiff_plain/fe2d3a36bd86cf549a43c8f3f603cfba564861b4 Added &OPTIONAL to DESTRUCTURING-BIND. Currently it's just ignored (next step woudl be to support default values). --- diff --git a/src/lib/ps-macro-lib.lisp b/src/lib/ps-macro-lib.lisp index 78af135..56b88dc 100644 --- a/src/lib/ps-macro-lib.lisp +++ b/src/lib/ps-macro-lib.lisp @@ -160,6 +160,8 @@ (atom (second bindings))) (bind-rest (second bindings)) (error "~a is invalid in destructuring list." bindings))) + ((eq (car bindings) '&optional) + (destructuring-wrap arr n (cdr bindings) body :setf? setf?)) (t (let ((var (car bindings)) (inner-body (destructuring-wrap arr (1+ n) (cdr bindings) body :setf? setf?))) (cond ((null var) inner-body)