(defn emit-nl [^Writer this nl]
(.write (getf :base) (int \newline))
(dosync (setf :trailing-white-space nil))
(let [lb (:logical-block nl)
^String prefix (:per-line-prefix lb)]
(if prefix
(.write (getf :base) prefix))
(let [^String istr (apply str (repeat (- @(:indent lb) (count prefix))
\space))]
(.write (getf :base) istr))
(update-nl-state lb)))
Comments top
No comments for emit-nl. Log in to add a comment.