finalize build

This commit is contained in:
Travis Shears 2026-05-27 21:38:25 +01:00
parent c652c21213
commit a99c2a8152
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
5 changed files with 10 additions and 3 deletions

View file

@ -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))))