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

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

(defn greet
  "Callable entry point to the application."
  [data]
  (println (str "Hello, " (or (:name data) "World") "!")))

(defn -main
  "I don't do a whole lot ... yet."
  [& 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)))))