Skip to content

Commit

Permalink
Add an iteractive eval that can read many forms if passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Crampsie authored and Drew Crampsie committed May 16, 2024
1 parent 36ddb8f commit 3b501b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/std/swank/eval.ss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
:std/swank/context)

(def-swank (swank:interactive-eval str)
(##object->string
(swank-eval-in-context `(eval (with-input-from-string , str read)))))
(let* ((form (swank-read-from-string-in-context str))
(res
(swank-eval-in-context form)))
(##object->string res)))

(def-swank (swank-repl:listener-eval str)
;; (displayln "Evaling " str)
Expand Down

0 comments on commit 3b501b5

Please sign in to comment.