 
 (defn -init [])
 
+(declare format-code)
 (defn -formatCode [this string]
+  (format-code string))
+
+(defn format-code [string]
   (loop [s string col 0 dstack [] out [] space nil incl false
          insl false incm false lwcr false sups true cmindent nil]
     (if-let [c (first s)] ; test comment 1 { ; )

                   r (if nl (dec (count cc)) (+ col (count cc)))
                   dstack (into out cc) nil false false
                   (if-not nl incm) (= c \return) nl cmindent))
          (= c \") (let [cc (if (or incl insl) [c] [\space c])]
                     (recur
                       r (+ col (count cc)) dstack (into out cc)
                       (if (and insl (not incl)) [\space]) false

                    false false false false (sups-char? c)
                    cmindent))))
      (apply str out))))


(deftest code-formatting
  (is (= "#\"something\"" (format-code "#\"something\""))))
