Browse files

Remove unnecessary return values from parser args

  • Loading branch information...
1 parent 62def02 commit 08e394af576a787e836a74fdf584e0f75936730c @trptcolin committed Sep 23, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/clj/reply/eval_modes/nrepl.clj
12 src/clj/reply/eval_modes/nrepl.clj
@@ -59,7 +59,7 @@
(reset! current-command-id nil)
-(defn repl-parse [request-prompt request-exit read-error execute]
+(defn repl-parse [request-exit execute]
(loop [text-so-far nil]
(if-let [next-text (.readLine *in*)]
(let [concatted-text (if text-so-far
@@ -89,24 +89,22 @@
(prompt ns)
(let [eof (Object.)
- request-prompt (Object.)
read-error (Object.)
+ execute (partial execute-with-client connection
+ (assoc options :interactive true))
[raw-input read-result]
(binding [*ns* (eval-state/get-ns)]
- (repl-parse request-prompt eof read-error
- (partial execute-with-client connection
- (assoc options :interactive true))))
+ (repl-parse eof execute))
(catch Exception e
[e read-error]))]
(cond (reply.exit/done? eof read-result)
- (= request-prompt read-result)
- (recur ns)
(= read-error read-result)
(do (println raw-input) ; where we stash any read exceptions
(recur ns))
+ ; TODO: expect result as seq of forms to consume and eval on this side
(recur (:ns read-result))))))))
;; TODO: this could be less convoluted if we could break backwards-compat

0 comments on commit 08e394a

Please sign in to comment.