unquote-splicing-node
function
rewrite-clj.node/unquote-splicing-node
(unquote-splicing-node [children])Create node representing a single unquote-spliced form where `children`
is either a sequence of nodes or a single node.
```Clojure
(require '[rewrite-clj.node :as n])
(-> (n/unquote-splicing-node (n/token-node 'my-var))
n/string)
;; => "~@my-var"
;; specifying a sequence allows for whitespace between the
;; splicing unquote and the splicing unquoted
(-> (n/unquote-splicing-node [(n/spaces 2)
(n/token-node 'my-var)])
n/string)
;; => "~@ my-var"
```
Examples
No examples yet. Be the first to add one!