src/middleware/macroexpand.lisp @ 9d3d9514dbd8

Formatting
author Steve Losh <steve@stevelosh.com>
date Sat, 09 Apr 2016 21:59:53 +0000
parents d74fc3dab8fa
children 051685b12e07
(in-package #:nrepl)

(define-middleware wrap-macroexpand "macroexpand" message
  ;; TODO: handle mangled input
  (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))))))