reader-macro-node
function
rewrite-clj.node/reader-macro-node
(reader-macro-node [children] [macro-node form-node])Create node representing a reader macro with `macro-node` and `form-node` or `children`.
```Clojure
(require '[rewrite-clj.node :as n])
;; here we call with macro-node and form-node
(-> (n/reader-macro-node (n/token-node 'my-macro)
(n/token-node 42))
n/string)
;; => "#my-macro 42"
;; calling with a sequence of children gives us control over whitespace
(-> (n/reader-macro-node [(n/token-node 'my-macro)
(n/spaces 4)
(n/token-node 42)])
n/string)
;; => "#my-macro 42"
```
Examples
No examples yet. Be the first to add one!