read: make whitespace after "#" an error
This commit is contained in:
parent
dfa320abb7
commit
3a3da137cf
8
read.scm
8
read.scm
|
@ -676,7 +676,8 @@
|
||||||
(define readtable:hash
|
(define readtable:hash
|
||||||
(readtable:process
|
(readtable:process
|
||||||
(readtable:empty/default read:read-hash-messages)
|
(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:jump/next readtable:block-comment))
|
||||||
(list readtable:update #\; readtable:datum-comment)
|
(list readtable:update #\; readtable:datum-comment)
|
||||||
(list readtable:update #\\ readtable:character)
|
(list readtable:update #\\ readtable:character)
|
||||||
|
@ -697,9 +698,7 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(readtable:process
|
(readtable:process
|
||||||
(readtable:empty/default readtable:read-ident)
|
(readtable:empty/default readtable:read-ident)
|
||||||
(list readtable:update-list
|
(list readtable:update-list readtable:ASCII-whitespace readtable:skip)
|
||||||
readtable:ASCII-whitespace
|
|
||||||
readtable:skip)
|
|
||||||
(list readtable:update #f (readtable:return 'eof))
|
(list readtable:update #f (readtable:return 'eof))
|
||||||
(list readtable:update %bol readtable:read-list)
|
(list readtable:update %bol readtable:read-list)
|
||||||
(list readtable:update %eol (readtable:error 'top "unbalanced list"))
|
(list readtable:update %eol (readtable:error 'top "unbalanced list"))
|
||||||
|
@ -794,3 +793,4 @@
|
||||||
(read-all "#!fold-case #TRUE")
|
(read-all "#!fold-case #TRUE")
|
||||||
(read-all "#u8(x y z w)")
|
(read-all "#u8(x y z w)")
|
||||||
(read-all "#\\newline")
|
(read-all "#\\newline")
|
||||||
|
(read-all "#\\a")
|
||||||
|
|
Loading…
Reference in New Issue