Skip to content

Commit

Permalink
Allow macro to be referred as through squint.core
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Sep 13, 2024
1 parent 8df5c90 commit 901ae8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/squint/compiler.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
(let [sym-ns (namespace sym)]
(if (and sym-ns
(or (= "clojure.core" sym-ns)
(= "cljs.core" sym-ns)))
(= "cljs.core" sym-ns)
(= "squint.core" sym-ns)))
(symbol (name sym))
sym)))

Expand All @@ -230,7 +231,7 @@
expr)
head-str (str head)
macro (when (symbol? head)
(or (built-in-macros head)
(or (built-in-macros (strip-core-symbol head))
(let [ns (namespace head)
nm (name head)
ns-state @(:ns-state env)
Expand Down
2 changes: 1 addition & 1 deletion src/squint/compiler/node.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
(when-not (fs/existsSync out-path)
(fs/mkdirSync out-path #js {:recursive true}))
(when-not (fs/existsSync out-path)
(throw (js/Error. (str "File not found, make sure output-dir is a valid path: ")
(throw (js/Error. "File not found, make sure output-dir is a valid path: "
{:output-dir output-dir
:out-file out-file})))
(spit out-file javascript)
Expand Down

0 comments on commit 901ae8d

Please sign in to comment.