Commits

Karsten Schmidt committed 7bc6b6c

minor core edits (formatting)

  • Participants
  • Parent commits c69cb3a
  • Branches develop

Comments (0)

Files changed (1)

File src/structgen/parser.clj

 (defmulti transform-node (fn [t c] t))
 
 (defmethod transform-node :sym [t c]
-	{:tag t :content (first c)})
+  {:tag t :content (first c)})
 
 (defmethod transform-node :num [t c]
-	{:tag t :content (first c)})
+  {:tag t :content (first c)})
 
 (defmethod transform-node :array [t c]
-	{:tag t :content (:content (first c))})
+  {:tag t :content (:content (first c))})
 
 (defmethod transform-node :decl [t c]
-	(let [[type id len] (map #(-> % :content) c)
-  			 len (if len (Integer/parseInt len))]
-  	{:tag t :content [(keyword id) (keyword type) len]}))
+  (let [[type id len] (map #(-> % :content) c)
+  	len (if len (Integer/parseInt len))]
+    {:tag t :content [(keyword id) (keyword type) len]}))
 
 (defmethod transform-node :typedef [t c]
   {:tag t
    :content {
      :declares (map :content (filter #(and (map? %) (= :decl (:tag %))) c))
-  	 :id (-> (filter #(and (map? %) (= :sym (:tag %))) c) first :content keyword)}})
+     :id (-> (filter #(and (map? %) (= :sym (:tag %))) c) first :content keyword)}})
 
 (defmethod transform-node :default [t c]
-	{:tag t :content c})
+  {:tag t :content c})
 
 (defn preprocess
   ([src & {:as userdefs}]