|
|
|
|
@ -2125,23 +2125,14 @@ |
|
|
|
|
|
|
|
|
|
(defn flistar [ilevel t nxt] |
|
|
|
|
(let [ |
|
|
|
|
preceding_space (clojure.string/join (repeat ilevel " ")), |
|
|
|
|
bracket_prec_space (clojure.string/join (repeat (- ilevel 1) " ")) |
|
|
|
|
preceding_space (clojure.string/join (repeat (* ilevel 2) " ")), |
|
|
|
|
bracket_prec_space (clojure.string/join (repeat (* (- ilevel 1) 2) " ")) |
|
|
|
|
] |
|
|
|
|
(cond |
|
|
|
|
(string? t) (format "\"%s\" " (clojure.string/escape t char-escape-string)) |
|
|
|
|
(string? t) (format "\"%s\" " t) |
|
|
|
|
(= t (symbol "{")) (format "\n%s{\n%s" bracket_prec_space preceding_space) |
|
|
|
|
(= t (symbol "}")) ( |
|
|
|
|
cond |
|
|
|
|
(nil? nxt) (format "\n%s}\n" preceding_space) |
|
|
|
|
(not= nxt (symbol "}")) (format "\n%s}\n%s" preceding_space preceding_space) |
|
|
|
|
(= nxt (symbol "}")) (format "\n%s}" preceding_space) |
|
|
|
|
) |
|
|
|
|
(= t (symbol ";")) ( |
|
|
|
|
cond |
|
|
|
|
(= nxt (symbol "}")) ";" |
|
|
|
|
:else (format ";\n%s" preceding_space) |
|
|
|
|
) |
|
|
|
|
(= t (symbol "}")) (format "\n%s}" bracket_prec_space) |
|
|
|
|
(= t (symbol ";")) (format ";\n%s" preceding_space) |
|
|
|
|
(and (not= nxt (symbol "{")) (not= nxt (symbol "}"))) (format "%s " t) |
|
|
|
|
:else (format "%s" t) |
|
|
|
|
) |
|
|
|
|
|