Use 'any-match?' predicate in elixir embedding query

This commit is contained in:
Max Brunsfeld 2023-11-27 15:06:20 -08:00
parent 1c62abbf79
commit 6468fe737e
2 changed files with 4 additions and 4 deletions

View File

@ -1659,13 +1659,13 @@ fn elixir_lang() -> Arc<Language> {
target: (identifier) @name)
operator: "when")
])
(#match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
(#any-match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
)
(call
target: (identifier) @name
(arguments (alias) @name)
(#match? @name "^(defmodule|defprotocol)$")) @item
(#any-match? @name "^(defmodule|defprotocol)$")) @item
"#,
)
.unwrap(),

View File

@ -18,10 +18,10 @@
target: (identifier) @name)
operator: "when")
])
(#match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
(#any-match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
)
(call
target: (identifier) @name
(arguments (alias) @name)
(#match? @name "^(defmodule|defprotocol)$")) @item
(#any-match? @name "^(defmodule|defprotocol)$")) @item