finalize build
This commit is contained in:
parent
c652c21213
commit
a99c2a8152
5 changed files with 10 additions and 3 deletions
|
|
@ -12,7 +12,6 @@
|
|||
(defn tokenize [source]
|
||||
(let [chars (vec source) total-chars (count chars)]
|
||||
(loop [cursor 0 tokens []]
|
||||
; (when (< cursor 100) (pprint {:tokens tokens}))
|
||||
(if (>= cursor total-chars)
|
||||
tokens
|
||||
(let [c (chars cursor) nxt (get chars (inc cursor))]
|
||||
|
|
@ -98,7 +97,6 @@
|
|||
(defn needs-space?
|
||||
"does this token need space before it?"
|
||||
[prev current nxt]
|
||||
(when (= (current :type) :string) (pprint {:current current}))
|
||||
(or
|
||||
(= (current :type) :open-annon-fn)
|
||||
(and
|
||||
|
|
@ -178,7 +176,6 @@
|
|||
re-map (build-rename-map (collect-bindings tokens))
|
||||
output (emit tokens re-map)
|
||||
output-file-name (gen-output-file-name file-name)]
|
||||
(pprint {:output output :token-sample (take 15 tokens) :bindings (build-rename-map (collect-bindings tokens))})
|
||||
(write-file "tokens.clj" (with-out-str (pprint (transform-tokens tokens re-map))))
|
||||
(write-file output-file-name output)
|
||||
(println (str "Wrote file " output-file-name))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue