[honu] return eof at the repl if an eof-object is read
This commit is contained in:
parent
5a28514553
commit
b4a74fc12d
|
@ -4,6 +4,8 @@
|
||||||
"private/honu-typed-scheme.rkt"
|
"private/honu-typed-scheme.rkt"
|
||||||
racket/port)
|
racket/port)
|
||||||
|
|
||||||
|
;; at the repl, honu will only read a single line at a time regardless
|
||||||
|
;; of how many expressions it contains
|
||||||
(define (read-one-line name input)
|
(define (read-one-line name input)
|
||||||
(define quit? #f)
|
(define quit? #f)
|
||||||
(define one-line
|
(define one-line
|
||||||
|
@ -18,8 +20,7 @@
|
||||||
(display next)
|
(display next)
|
||||||
(loop))))))
|
(loop))))))
|
||||||
(if quit?
|
(if quit?
|
||||||
;; this isn't right, somehow communicate to the system that the repl should close
|
eof
|
||||||
#'(exit)
|
|
||||||
(honu-read-syntax name (open-input-string one-line))))
|
(honu-read-syntax name (open-input-string one-line))))
|
||||||
|
|
||||||
(provide configure)
|
(provide configure)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user