(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)))
结果是有额外的括号出现在 handle
之后和 (link: this e)
之前。
(do (reify* (link: javafx.event.EventHandler) (handle ((link: this e) 1))))