cs: eval multiple expressions provided with -e

This commit is contained in:
Matthew Flatt 2019-12-17 07:30:47 -07:00
parent 899aa24756
commit d7f2bd3e15

View File

@ -371,10 +371,14 @@
(set! loads
(cons
(lambda ()
(define i (open-input-string expr))
(let loop ()
(define expr (read i))
(unless (eof-object? expr)
(call-with-values (lambda ()
(call-with-continuation-prompt
(lambda ()
(eval `(|#%top-interaction| . ,(read (open-input-string expr)))))
(eval `(|#%top-interaction| . ,expr)))
(default-continuation-prompt-tag)
(lambda (proc)
;; continue escape to set error status:
@ -383,7 +387,8 @@
(for-each (lambda (v)
(|#%app| (current-print) v)
(flush-output))
vals))))
vals)))
(loop))))
loads))
(flags-loop rest-args (see saw 'non-config)))]
[("-k")