     (number? x) x
     :else (look (x 1)))))
 
-(defn debugMessage [message]
+(defn debugMessage
   "Shows debugging messages."
+  [message]
   (println (string/join message)))
 
-(defn write [bytecode]
+(defn write
   "Write bytecode to the output file."
+  [bytecode]
   (spit outputFile bytecode :append true))
 
-(defn tokenReader [token]
+(defn tokenReader
   "Reads a token."
+  [token]
   (def t (parser token))
   (println (apply array-map t))
   (comment (insta/visualize t))
   (println (second t)))
 
-(defn removeEmptyLineOrComment [source]
+(defn removeEmptyLineOrComment
   "Find and remove empty lines and comments from the source code."
+  [source]
   (def reComment #"\s*#.*")
   (def sourceWithoutComment (clojure.string/replace source reComment ""))
   (def reEmptyLine #"^\s*$")

    (= (re-find matchEmptyLine) true) source
    :else sourceWithoutComment))

(defn readSource [file]
  "Read source file and remove empty lines."
  (with-open [rdr (reader file)]
    (def source
      (for [line (line-seq rdr)] (removeEmptyLineOrComment line)))
    (doseq [x (remove empty? source)]
      (tokenReader x))))

(defn checkSource [file]
  "Check if source file exists."
  (debugMessage ["Reading '" file "'"])
  (cond
    (.exists (as-file file)) (readSource file)

  [& args]
  (cond
    (= (count args) 1) (checkSource (nth args 0))
    :else (println "Wrong number of arguments.")))
