Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.macro by

(defmacro event-handler (link: argsv & body)
`(reify EventHandler (~'handle ~argsv ~@body)))

(macroexpand
'(macrolet (link: (add-handler [& body)

                       `(event-handler
                          (link: ~'this ~'e) ~@body))]
 (add-handler 1)))

results in (notice the extra paren after handle and before (link: this e)):

(do (reify* (link: javafx.event.EventHandler) (handle ((link: this e) 1))))

2 Answers

0 votes
by

Comment made by: oskarkv

This has been fixed in in version 0.1.5, but the github page https://github.com/clojure/tools.macro says that the latest version is 0.1.2.

0 votes
by
Reference: https://clojure.atlassian.net/browse/TMACRO-7 (reported by alex+import)
...