src/middleware/macroexpand.lisp @ d74fc3dab8fa

Add load-file and macroexpand middlewares
author Steve Losh <steve@stevelosh.com>
date Wed, 09 Dec 2015 17:47:41 +0000
parents (none)
children 9d3d9514dbd8
(in-package #:nrepl)

(define-middleware wrap-macroexpand "macroexpand" message
  (let ((form (read-from-string (fset:lookup message "form"))))
    (respond message
             (make-map
               "status" '("done")
               "macroexpand" (format nil "~A" (macroexpand form))
               "macroexpand-1" (format nil "~A" (macroexpand-1 form))))))