Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Commit 3248872

Browse files
committed
separate top level by semi-colon
1 parent 149f0a3 commit 3248872

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

cherry/corpus/foo.cljs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22

33
(js/console.log "hello")
44
(js/console.log (+ 1 2 3))
5+
6+
(let [x (do (js/console.log "in do")
7+
12)]
8+
(js/console.log "x + 1 =" (inc x)))

cherry/corpus/foo.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
console.log("hello")
2-
console.log((1 + 2 + 3))
1+
console.log("hello");
2+
console.log((1 + 2 + 3));
3+
(function () { const x = (function () { console.log("in do");
4+
return 12; })();
5+
return (function () { return console.log("x + 1 =", (x + 1)); })(); })();

cherry/src/cherry/transpiler.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
transpiled
473473
(let [next-js (js (clj next-form))]
474474
(recur (str transpiled next-js (when-not (str/blank? next-js)
475-
"\n")))))))))
475+
";\n")))))))))
476476

477477
(defn transpile-file [{:keys [in-file out-file]}]
478478
(let [out-file (or out-file

0 commit comments

Comments
 (0)