 ;; Form Formatting
 ;;------------------------------------------------------------
 
+(defn symbol->filename
+  [s]
+  (-> (name s)
+      (replace ">" "GT")
+      (replace "<" "LT")
+      (replace "!" "BANG")
+      (replace "?" "QMARK")
+      (replace "*" "STAR")
+      (replace "+" "PLUS")
+      (replace "/" "SLASH")))
+
 (defn get-def-name
   [form]
   (let [[a b c] form

(ns core
  (:require
    [clojure.java.io :as io]
    [clojure.tools.reader :as reader]
    [clojure.tools.reader.reader-types :as readers]
    [clojure.string :refer [split-lines join]]
    [cljs.env :as env]
    [cljs.tagged-literals :refer [*cljs-data-readers*]]
    [cljs.analyzer :refer [forms-seq analyze-file]]))

;;------------------------------------------------------------
;; Form Retrieving

   "clojure.set"    {:cljs {"set.cljs"    "clojurescript/src/cljs/clojure/set.cljs"}}
   "clojure.string" {:cljs {"string.cljs" "clojurescript/src/cljs/clojure/string.cljs"}}})

(defn get-repo-path
  [& args]
  (str  "code-to-parse/" (get-in paths args)))

(defmulti get-symbols (fn [ns-] ns-))

(defmethod get-symbols "cljs.core" [ns-]
  (let [clj-forms      (get-forms-from-file (get-repo-path "cljs.core" :clj "core.clj"))
        clj-cljs-forms (get-forms-from-file (get-repo-path "cljs.core" :cljs "core.clj"))
        imported-macros (nth (first (filter #(= 'import-macros (first %)) clj-cljs-forms)) 2)
        cljs-forms     (get-forms-from-file (get-repo-path "cljs.core" :cljs "core.cljs"))
        ;; TODO: read in clojure.core forms listed in import-macros vector
        ]
    (println imported-macros)
    ))

(defmethod get-symbols "clojure.set" [ns-]
  (let [forms (get-forms-from-file (get-repo-path "clojure.set" :cljs "set.cljs"))]
