Changeset 10896

Show
Ignore:
Timestamp:
09/13/05 14:40:59 (3 years ago)
Author:
rtoy
Message:

Convert extended LOOP constructs in pprint annotations to equivalent
(I hope) DO expressions.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/code/pprint.lisp

    r10719 r10883  
    13931393           stream list)) 
    13941394 
     1395(defun pprint-declare (stream list &rest noise) 
     1396  (declare (ignore noise)) 
     1397  (pprint-logical-block (stream list :prefix "(" :suffix ")") 
     1398    ;; Output "declare" 
     1399    (output-object (pprint-pop) stream) 
     1400    (pprint-exit-if-list-exhausted) 
     1401    (pprint-newline :miser stream) 
     1402    (write-char #\space stream) 
     1403    (pprint-indent :current 0 stream) 
     1404    ;; Print out each spec. 
     1405    (loop 
     1406       (let ((spec (pprint-pop))) 
     1407         ;; If the spec begins with TYPE, we indent it so that vars 
     1408         ;; are lined up after the actual type.  Otherwise, we just 
     1409         ;; make them all line up after the first symbol of the 
     1410         ;; spec. 
     1411         (pprint-logical-block (stream spec :prefix "(" :suffix ")") 
     1412           (when (eq (car spec) 'type) 
     1413             (output-object (pprint-pop) stream) 
     1414             (pprint-exit-if-list-exhausted) 
     1415             (pprint-newline :miser stream) 
     1416             (write-char #\space stream)) 
     1417           (output-object (pprint-pop) stream) 
     1418           (pprint-exit-if-list-exhausted) 
     1419           (pprint-newline :miser stream) 
     1420           (write-char #\space stream) 
     1421           (pprint-indent :current 0 stream) 
     1422           (loop 
     1423              (output-object (pprint-pop) stream) 
     1424              (pprint-exit-if-list-exhausted) 
     1425              (write-char #\space stream) 
     1426              (pprint-newline :fill stream)))) 
     1427       (pprint-exit-if-list-exhausted) 
     1428       (write-char #\space stream) 
     1429       (pprint-newline :linear stream)))) 
     1430 
    13951431(defun pprint-defun (stream list &rest noise) 
    13961432  (declare (ignore noise)) 
     
    16971733    (throw pprint-block) 
    16981734    (unwind-protect pprint-block) 
     1735    (declare pprint-declare) 
    16991736     
    17001737    ;; Macros.