Use 'any-match?' predicate in elixir embedding query
This commit is contained in:
parent
1c62abbf79
commit
6468fe737e
2 changed files with 4 additions and 4 deletions
|
@ -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(),
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue