Skip to content

Commit

Permalink
fix: Fix evaluation handlers to return evaluated result value
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Nov 5, 2024
1 parent ad692d0 commit c4581c8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/elin/handler/evaluate.clj
Original file line number Diff line number Diff line change
Expand Up @@ -44,39 +44,44 @@
[elin]
(e/->> {:middleware (evaluate-interceptor-middleware elin)}
(e.f.evaluate/evaluate-current-top-list elin)
(:response)))
(:response)
(:value)))

(m/=> evaluate-current-list [:=> [:cat e.s.handler/?Elin] any?])
(defn evaluate-current-list
"Evaludate current list."
[elin]
(e/->> {:middleware (evaluate-interceptor-middleware elin)}
(e.f.evaluate/evaluate-current-list elin)
(:response)))
(:response)
(:value)))

(m/=> evaluate-current-expr [:=> [:cat e.s.handler/?Elin] any?])
(defn evaluate-current-expr
"Evaluate current expression."
[elin]
(e/->> {:middleware (evaluate-interceptor-middleware elin)}
(e.f.evaluate/evaluate-current-expr elin)
(:response)))
(:response)
(:value)))

(m/=> evaluate-namespace-form [:=> [:cat e.s.handler/?Elin] any?])
(defn evaluate-namespace-form
"Evaluate ns form in current buffer."
[elin]
(e/->> {:middleware (evaluate-interceptor-middleware elin)}
(e.f.evaluate/evaluate-namespace-form elin)
(:response)))
(:response)
(:value)))

(defn evaluate-at-mark
"Evaluate top list at mark."
[{:as elin :keys [message]}]
(let [[mark-id] (:params message)]
(e/->> {:middleware (evaluate-interceptor-middleware elin)}
(e.f.evaluate/evaluate-at-mark elin mark-id)
(:response))))
(:response)
(:value))))

(m/=> evaluate-current-buffer [:=> [:cat e.s.handler/?Elin] any?])
(defn evaluate-current-buffer
Expand Down

0 comments on commit c4581c8

Please sign in to comment.