Skip to content

Commit

Permalink
Merge pull request #80 from julienvincent/jv/ref-npowoqkxqokm
Browse files Browse the repository at this point in the history
Improve clojure pairwise queries
  • Loading branch information
julienvincent authored Oct 17, 2024
2 parents 3db0850 + f7daa85 commit f842d84
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions queries/clojure/paredit/pairs.scm
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
(list_lit
(sym_lit) @fn-name
(#any-of? @fn-name
"let"
"loop"
"binding"
"with-open"
"with-redefs")

(vec_lit
(_) @pair)
(#any-of? @fn-name "let" "loop" "binding" "with-open" "with-redefs"))
(_) @pair))

(map_lit
(_) @pair)

(list_lit
(sym_lit) @fn-name
(_)
(_) @pair
(#eq? @fn-name "case"))
(#eq? @fn-name "case")

(_) .
((_) @pair . (_) @pair)+
(_)?)

(list_lit
(sym_lit) @fn-name
(_) @pair
(#eq? @fn-name "cond"))
(#eq? @fn-name "cond")

(list_lit
((_) @pair (_) @pair)+)

(list_lit
(sym_lit) @fn-name
(#any-of? @fn-name
"cond->"
"cond->>")
(_)
(_)
(_) @pair
(#eq? @fn-name "condp"))
.
((_) @pair . (_) @pair)+)

(list_lit
(sym_lit) @fn-name
(#eq? @fn-name "condp")

(_) (_)
.
((_) @pair . (_) @pair)+
.
(_)?)

0 comments on commit f842d84

Please sign in to comment.