borkdude / grasp

Grep Clojure code using clojure.spec regexes
Eclipse Public License 1.0
242 stars 7 forks source link

Add g/q macro that quotes everything automatically unless unquote is used #10

Closed borkdude closed 3 years ago

borkdude commented 3 years ago

E.g.:

(g/seq 'update 'ctx ':callstack (s/* any?))

could be written as:

(g/q (update ctx :callstack ~(s/* any?)))

and with g/* this becomes:

(g/q (update ctx :callstack ~g/*))