mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 09:40:25 +02:00
Consume a peeked EOF at the REPL.
* module/system/repl/repl.scm (meta-reader): Consume peeked EOF.
This commit is contained in:
parent
7f3be1db99
commit
7520a9b95d
1 changed files with 2 additions and 5 deletions
|
@ -87,12 +87,9 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((ch (flush-leading-whitespace)))
|
(let ((ch (flush-leading-whitespace)))
|
||||||
(cond ((eof-object? ch)
|
(cond ((eof-object? ch)
|
||||||
;; EOF objects are not buffered. It's quite possible
|
(read-char)) ; consume the EOF and return it
|
||||||
;; to peek an EOF then read something else. It's
|
|
||||||
;; strange but it's how it works.
|
|
||||||
ch)
|
|
||||||
((eqv? ch #\,)
|
((eqv? ch #\,)
|
||||||
(read-char port)
|
(read-char)
|
||||||
meta-command-token)
|
meta-command-token)
|
||||||
((read-comment lang port ch)
|
((read-comment lang port ch)
|
||||||
*unspecified*)
|
*unspecified*)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue