cs: eval multiple expressions provided with -e
This commit is contained in:
parent
899aa24756
commit
d7f2bd3e15
|
@ -371,19 +371,24 @@
|
|||
(set! loads
|
||||
(cons
|
||||
(lambda ()
|
||||
(call-with-values (lambda ()
|
||||
(call-with-continuation-prompt
|
||||
(lambda ()
|
||||
(eval `(|#%top-interaction| . ,(read (open-input-string expr)))))
|
||||
(default-continuation-prompt-tag)
|
||||
(lambda (proc)
|
||||
;; continue escape to set error status:
|
||||
(abort-current-continuation (default-continuation-prompt-tag) proc))))
|
||||
(lambda vals
|
||||
(for-each (lambda (v)
|
||||
(|#%app| (current-print) v)
|
||||
(flush-output))
|
||||
vals))))
|
||||
(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| . ,expr)))
|
||||
(default-continuation-prompt-tag)
|
||||
(lambda (proc)
|
||||
;; continue escape to set error status:
|
||||
(abort-current-continuation (default-continuation-prompt-tag) proc))))
|
||||
(lambda vals
|
||||
(for-each (lambda (v)
|
||||
(|#%app| (current-print) v)
|
||||
(flush-output))
|
||||
vals)))
|
||||
(loop))))
|
||||
loads))
|
||||
(flags-loop rest-args (see saw 'non-config)))]
|
||||
[("-k")
|
||||
|
|
Loading…
Reference in New Issue
Block a user