Changeset 6617
- Timestamp:
- May 28, 2007, 12:43:25 AM (18 years ago)
- File:
-
- 1 edited
-
branches/ide-1.0/ccl/lib/arglist.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ide-1.0/ccl/lib/arglist.lisp
r4782 r6617 56 56 (ignore-errors (values (read stream nil eof)))) 57 57 (when errorp 58 #+help-file ; %HEL temporarily avoiding reference to help file59 (if use-help-file60 (return-from %arglist61 (%arglist sym include-bindings temp-cons-p nil)))62 58 (push '&rest res) 63 59 (push ':unparseable res) … … 171 167 (values (nreverse res) t)) 172 168 (values nil (zerop ncells))))))) 169 170 (defun arg-names-from-map (lfun) 171 (multiple-value-bind (nreq nopt restp nkeys allow-other-keys 172 optinit lexprp 173 ncells nclosed) 174 (function-args lfun) 175 (declare (ignore optinit ncells allow-other-keys)) 176 (collect ((req) 177 (opt) 178 (keys)) 179 (let* ((rest nil) 180 (map (car (function-symbol-map lfun)))) 181 (if map 182 (let ((total (+ nreq nopt (if (or restp lexprp) 1 0) (or nkeys 0))) 183 (idx (- (length map) nclosed))) 184 (unless (zerop total) 185 (progn 186 (dotimes (x nreq) 187 (declare (fixnum x)) 188 (req (if (> idx 0) (elt map (decf idx)) (make-arg "ARG" x)))) 189 (when (neq nopt 0) 190 (dotimes (x (the fixnum nopt)) 191 (opt (if (> idx 0) (elt map (decf idx)) (make-arg "OPT" x))))) 192 (when nkeys 193 (dotimes (i (the fixnum nkeys)) 194 (keys (if (> idx 0) (elt map (decf idx)) (make-arg "KEY" i))))) 195 (when (or restp lexprp) 196 (setq rest (if (> idx 0) (elt map (decf idx)) 'the-rest))))))) 197 (values (not (null map)) (req) (opt) rest (keys)))))) 198 199 200 173 201 174 202 (defvar *req-arg-names*
Note:
See TracChangeset
for help on using the changeset viewer.
