readtable: handle EOF by returning EOF symbol
This commit is contained in:
parent
657db57826
commit
775eb863ef
3
read.scm
3
read.scm
|
@ -242,6 +242,7 @@
|
||||||
(readtable:process
|
(readtable:process
|
||||||
(readtable:empty/default readtable:read-ident)
|
(readtable:empty/default readtable:read-ident)
|
||||||
(list readtable:add-all-as-skip readtable:ASCII-whitespace)
|
(list readtable:add-all-as-skip readtable:ASCII-whitespace)
|
||||||
|
(list readtable:update #f (readtable:return 'eof))
|
||||||
(list readtable:update #\;
|
(list readtable:update #\;
|
||||||
(readtable:jump-discard readtable:read-to-newline))))
|
(readtable:jump-discard readtable:read-to-newline))))
|
||||||
|
|
||||||
|
@ -275,6 +276,6 @@
|
||||||
(loop))))))
|
(loop))))))
|
||||||
(loop)))))
|
(loop)))))
|
||||||
|
|
||||||
(read-all "x yy zz ; this is a comment\nx")
|
(read-all "x yy zz ; this is a comment\nx call/cc ")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue