read: make whitespace after "#" an error

This commit is contained in:
Peter McGoron 2024-09-27 16:15:44 -04:00
parent dfa320abb7
commit 3a3da137cf
1 changed files with 4 additions and 4 deletions

View File

@ -676,7 +676,8 @@
(define readtable:hash
(readtable:process
(readtable:empty/default read:read-hash-messages)
;; TODO: add whitespace to fail
(list readtable:update-list readtable:ASCII-whitespace
(readtable:error 'hash 'whitespace-after-hash))
(list readtable:update #\| (readtable:jump/next readtable:block-comment))
(list readtable:update #\; readtable:datum-comment)
(list readtable:update #\\ readtable:character)
@ -697,9 +698,7 @@
(lambda ()
(readtable:process
(readtable:empty/default readtable:read-ident)
(list readtable:update-list
readtable:ASCII-whitespace
readtable:skip)
(list readtable:update-list readtable:ASCII-whitespace readtable:skip)
(list readtable:update #f (readtable:return 'eof))
(list readtable:update %bol readtable:read-list)
(list readtable:update %eol (readtable:error 'top "unbalanced list"))
@ -794,3 +793,4 @@
(read-all "#!fold-case #TRUE")
(read-all "#u8(x y z w)")
(read-all "#\\newline")
(read-all "#\\a")