Macroexpansion middleware.
Macroexpansion middleware.
(handle-macroexpand-clj handler {:keys [code expander ns] :as msg})
Substitute the incoming macroexpand
message with an eval
message that will
perform the expansion for us, intercept the result with
eval-interceptor-transport
, post-process it and return back to the client.
Delegating the actual expansion (and even reading the code string) to eval
op is preferable because it ensures that the context (state of dynamic
variables) for macroexpansion is identical to if the user called (macroexpand ...)
manually at the REPL.
Substitute the incoming `macroexpand` message with an `eval` message that will perform the expansion for us, intercept the result with `eval-interceptor-transport`, post-process it and return back to the client. Delegating the actual expansion (and even reading the code string) to `eval` op is preferable because it ensures that the context (state of dynamic variables) for macroexpansion is identical to if the user called `(macroexpand ...)` manually at the REPL.
(macroexpand-step form)
Walk form, expanding the next subform.
Walk form, expanding the next subform.
(macroexpansion-reply-clj {:keys [transport] :as msg} {:keys [value] :as resp})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close