Tools for writing macros.
Latest stable release: 0.2.0
CLI/deps.edn
dependency information:
org.clojure/tools.macro {:mvn/version "0.2.0"}
Leiningen dependency information:
[org.clojure/tools.macro "0.2.0"]
Maven dependency information:
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.macro</artifactId>
<version>0.1.5</version>
</dependency>
Example:
(macrolet [(foo [form] `(~form ~form))]
(foo x))
expands to (x x)
Example:
(symbol-macrolet [def foo]
(def def def))
expands to (def def foo)
Example:
(defsymbolmacro sum-2-3 (plus 2 3))
(with-symbol-macros
(+ 1 sum-2-3))
expands to (+ 1 (plus 2 3))
like clojure.core/macroexpand-1, but handles symbol macros
like clojure.core/macroexpand, but handles symbol macros
full recursive macro expansion
For writing def-like macros. Handles optional docstrings and attribute maps for a name to be defined in a list of macro arguments.
name-with-attributes
Copyright (c) Rich Hickey. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (https://opensource.org/license/epl-1-0/) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound bythe terms of this license. You must not remove this notice, or any other, from this software.
Can you improve this documentation? These fine people already did:
Alex Miller, Konrad Hinsen, JarrodCTaylor, Sean Corfield, Fogus, fogus & Stuart HallowayEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close