Enhance output layout

This commit is contained in:
Renaud Casenave-Péré 2015-03-25 23:25:00 +01:00
parent f12a8076d0
commit 1a94093619

View file

@ -35,13 +35,19 @@
collect name))) collect name)))
(apply #'concatenate 'string (apply #'concatenate 'string
(append (loop for binding in bindings (append (loop for binding in bindings
collect (format nil "~(~a ~a~)~@[ = ~a~];~%" (second binding) (first binding) collect (format nil "~@[~vt~]~(~a ~a~)~@[ = ~a~];~%"
(walk-list (cddr binding)))) (when (> *current-indent* 0)
*current-indent*)
(second binding) (first binding)
(if (and (cddr binding)
(not (cdddr binding)))
(walk-1 (third binding))
(walk-list (cddr binding)))))
(walk-list body))))) (walk-list body)))))
(defun default-handler (first &rest rest) (defun default-handler (first &rest rest)
"Handle a simple function call." "Handle a simple function call."
(format nil "~@[~vt~]~(~a~) (~{~a~^, ~});~%" (format nil "~@[~vt~]~(~a (~{~a~^, ~})~);~%"
(when (> *current-indent* 0) (when (> *current-indent* 0)
*current-indent*) *current-indent*)
(if (symbolp first) (if (symbolp first)