Skip to main content

var-node

function

rewrite-clj.node/var-node

(var-node [children])
Create node representing a var where `children` is either a sequence of nodes or a single node. ```Clojure (require '[rewrite-clj.node :as n]) (-> (n/var-node (n/token-node 'my-var)) n/string) ;; => "#'my-var" ;; specifying a sequence allows for whitespace between the ;; prefix and the var (-> (n/var-node [(n/spaces 2) (n/token-node 'my-var)]) n/string) ;; => "#' my-var" ```

No examples yet. Be the first to add one!