File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 476476 (emitln " throw " throw " ;" )))
477477
478478(def base-types
479- #{" null" " *"
479+ #{" null" " *" " ...* "
480480 " boolean" " Boolean"
481481 " string" " String"
482482 " number" " Number"
509509 t (if optional?
510510 (subs t 0 (dec (count t)))
511511 t)
512- ret (str (:name (ana/resolve-var env (symbol t))))]
512+ ret (munge ( str (:name (ana/resolve-var env (symbol t) ))))]
513513 (if optional?
514514 (str ret " =" )
515515 ret))))
516516
517- (defn type-munge [s]
518- (cond
519- (= " null" s) s
520- (= " *" s) s
521- :else (munge s)))
522-
523517(defn resolve-types [env ts]
524518 (let [ts (-> ts string/trim (subs 1 (dec (count ts))))
525519 xs (string/split ts #"\| " )]
526- (str
527- " {"
528- (->> (map #(resolve-type env %) xs)
529- (map type-munge)
530- (string/join " |" ))
531- " }" )))
520+ (str " {" (string/join " |" (map #(resolve-type env %) xs)) " }" )))
532521
533522(defn munge-param-return [env line]
534523 (cond
You can’t perform that action at this time.
0 commit comments