From 40367d7e571eb3121faca0568038130c304b0d21 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Sat, 19 Feb 2022 14:20:09 -0500 Subject: [PATCH] Update number lexing comments --- src/ludus/scanner.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ludus/scanner.clj b/src/ludus/scanner.clj index d1899d5..5806741 100644 --- a/src/ludus/scanner.clj +++ b/src/ludus/scanner.clj @@ -135,7 +135,8 @@ :else (add-error scanner "Unexpected " char "after keyword :" key))))) ;; TODO: improve number parsing? -;; This will currently parse 000001 as 1. Is that correct behaviour? +;; Currently this uses Clojure's number formatting rules (since we use the EDN reader) +;; These rules are here: https://cljs.github.io/api/syntax/number (defn- add-number [char scanner] (loop [scanner scanner num (str char)