X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-format.lisp;h=7d4095e48c6312b78acdaaa3e8f50f9e4ccbf26f;hb=6ab9c60f1c53cc7cc912d644658bc23453a82ac4;hp=77597af8cbbc557f31be92627a75ae434683716d;hpb=9cd69ef4f515e7917da3cc69ed228d520b6bcd29;p=sbcl.git diff --git a/src/code/late-format.lisp b/src/code/late-format.lisp index 77597af..7d4095e 100644 --- a/src/code/late-format.lisp +++ b/src/code/late-format.lisp @@ -1245,14 +1245,15 @@ ;; corresponding argument was a list. (t (values 1 1 remaining)))))) (walk-conditional (conditional directives args) - (declare (ignore args)) (let ((*default-format-error-offset* (1- (format-directive-end conditional)))) (multiple-value-bind (sublists last-semi-with-colon-p remaining) (parse-conditional-directive directives) (declare (ignore last-semi-with-colon-p)) - (let ((sub-max (loop for s in sublists - maximize (nth-value 1 (walk-directive-list s args))))) + (let ((sub-max + (loop for s in sublists + maximize (nth-value + 1 (walk-directive-list s args))))) (cond ((format-directive-atsignp conditional) (values 1 (max 1 sub-max) remaining)) @@ -1268,7 +1269,9 @@ (let ((*default-format-error-offset* (1- (format-directive-end iteration)))) (let* ((close (find-directive directives #\} nil)) - (posn (position close directives)) + (posn (or (position close directives) + (error 'format-error + :complaint "no corresponding close brace"))) (remaining (nthcdr (1+ posn) directives))) ;; FIXME: if POSN is zero, the next argument must be ;; a format control (either a function or a string). @@ -1297,6 +1300,7 @@ (unless (format-directive-colonp directive) (incf-both))) ((or (find c "IT%&|_();>") (char= c #\Newline))) + ;; FIXME: check correspondence of ~( and ~) ((char= c #\<) (walk-complex-directive walk-justification)) ((char= c #\[)