Compare commits

..

No commits in common. '203968960e995ac48fb34cbad7e647862cd671c4' and 'a855e082cc511463913c0fd90c6b41144dffa942' have entirely different histories.

  1. 19
      src/rustint/core.clj
  2. 2
      test/rustint/core_test.clj

@ -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)
)

@ -551,7 +551,7 @@
]
(is (=
printed
"fn main ( )\n{\n println! ( \"Hola, mundo!\" )\n}\n"
"fn main ( )\n{\n println! ( \"Hola, mundo!\" )\n}"
)
)
)

Loading…
Cancel
Save