keywords must start with lower case

This commit is contained in:
Scott Richmond 2024-05-14 13:45:41 -04:00
parent 3b3071adb0
commit 67cd9d479b

View File

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