This commit is contained in:
Scott Richmond 2023-05-18 16:44:14 -04:00
parent a7ab313a5f
commit 23e29fdca2

View File

@ -46,7 +46,7 @@
"true" true
"false" false
"nil" nil
})
})
(defn- new-scanner
"Creates a new scanner."
@ -332,7 +332,7 @@
(assoc scanner :start (:current scanner)))
(defn scan [source]
(loop [scanner (new-scanner (str source "\n"))]
(loop [scanner (new-scanner source)]
(if (at-end? scanner)
(let [scanner (add-token scanner :eof)]
{:tokens (:tokens scanner)