From 67cd9d479b43e34205b2a17b532ba495976557b0 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Tue, 14 May 2024 13:45:41 -0400 Subject: [PATCH] keywords must start with lower case --- janet/scanner.janet | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/janet/scanner.janet b/janet/scanner.janet index 979ce71..e08228e 100644 --- a/janet/scanner.janet +++ b/janet/scanner.janet @@ -14,6 +14,7 @@ "nil" :nil ## impl -> literal word "ns" :ns ## impl "panic!" :panic ## impl (should _not_ be a function) + "pkg" :pkg "recur" :recur ## impl "ref" :ref ## impl "then" :then ## impl @@ -295,8 +296,9 @@ "&" (add-comment char scanner) ## keywords + # XXX: make sure we want only lower-only keywords ":" (cond - (alpha? next) (add-keyword scanner) + (lower? next) (add-keyword scanner) :else (add-error scanner (string "Expected keyword. Got " char next))) ## splats