aboutsummaryrefslogtreecommitdiff
path: root/src/cljcc/cljcc.clj
blob: bfecc3bf7852ea9daf145bddbe51fe6d17b26981 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(ns cljcc.cljcc
  (:require
   [cljcc.driver :as d])
  (:gen-class))

(set! *warn-on-reflection* true)

(defn -main
  "Main entrypoint for cljcc compiler."
  [& args]
  (let [input-file-path (first args)]
    (try
     (d/run input-file-path)
     (println "success")
     (catch Exception e
       (println "Error: " (.getMessage e))
       (System/exit 1))
     (finally
       (System/exit 0)))))