File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 4848; * special
4949(
5050 (identifier) @constant.builtin
51- (#match ? @constant.builtin "^( __MODULE__| __DIR__| __ENV__| __CALLER__| __STACKTRACE__)$ ")
51+ (#any-of ? @constant.builtin "__MODULE__" " __DIR__" " __ENV__" " __CALLER__" " __STACKTRACE__")
5252)
5353
5454; Comment
122122; * definition keyword
123123(call
124124 target: (identifier) @keyword
125- (#match ? @keyword "^( def| defdelegate| defexception| defguard| defguardp| defimpl| defmacro| defmacrop| defmodule| defn| defnp| defoverridable| defp| defprotocol| defstruct)$ "))
125+ (#any-of ? @keyword "def" " defdelegate" " defexception" " defguard" " defguardp" " defimpl" " defmacro" " defmacrop" " defmodule" " defn" " defnp" " defoverridable" " defp" " defprotocol" " defstruct"))
126126
127127; * kernel or special forms keyword
128128(call
129129 target: (identifier) @keyword
130- (#match ? @keyword "^( alias| case| cond| for|if| import| quote| raise| receive| require| reraise| super| throw| try| unless| unquote| unquote_splicing| use| with)$ "))
130+ (#any-of ? @keyword "alias" " case" " cond" " for" "if" " import" " quote" " raise" " receive" " require" " reraise" " super" " throw" " try" " unless" " unquote" " unquote_splicing" " use" " with"))
131131
132132; * just identifier in function definition
133133(call
139139 left: (identifier) @function
140140 operator: "when")
141141 ])
142- (#match ? @keyword "^( def| defdelegate| defguard| defguardp| defmacro| defmacrop| defn| defnp| defp)$ "))
142+ (#any-of ? @keyword "def" " defdelegate" " defguard" " defguardp" " defmacro" " defmacrop" " defn" " defnp" " defp"))
143143
144144; * pipe into identifier (function call)
145145(binary_operator
153153 (binary_operator
154154 operator: "|>"
155155 right: (identifier) @variable ))
156- (#match ? @keyword "^( def| defdelegate| defguard| defguardp| defmacro| defmacrop| defn| defnp| defp)$ "))
156+ (#any-of ? @keyword "def" " defdelegate" " defguard" " defguardp" " defmacro" " defmacrop" " defn" " defnp" " defp"))
157157
158158; * pipe into field without parentheses (function call)
159159(binary_operator
208208 quoted_end: _ @comment.doc ) @comment.doc
209209 (boolean) @comment.doc
210210 ]))
211- (#match ? @comment.doc.__attribute__ "^( moduledoc| typedoc| doc)$ "))
211+ (#any-of ? @comment.doc.__attribute__ "moduledoc" " typedoc" " doc"))
212212
213213; Module
214214
Original file line number Diff line number Diff line change 22((sigil
33 (sigil_name) @_sigil_name
44 (quoted_content) @injection.content )
5- (#match ? @_sigil_name "^(H| LVN)$ ")
5+ (#any-of ? @_sigil_name "H" " LVN")
66 (#set! injection.language "heex")
77 (#set! injection.combined))
Original file line number Diff line number Diff line change 44(call
55 target: (identifier) @ignore
66 (arguments (alias) @name )
7- (#match ? @ignore "^( defmodule| defprotocol)$ ")) @definition.module
7+ (#any-of ? @ignore "defmodule" " defprotocol")) @definition.module
88
99; * functions/macros
1010(call
2020 left: (call target: (identifier) @name )
2121 operator: "when")
2222 ])
23- (#match ? @ignore "^( def| defp| defdelegate| defguard| defguardp| defmacro| defmacrop| defn| defnp)$ ")) @definition.function
23+ (#any-of ? @ignore "def" " defp" " defdelegate" " defguard" " defguardp" " defmacro" " defmacrop" " defn" " defnp")) @definition.function
2424
2525; References
2626
2727; ignore calls to kernel/special-forms keywords
2828(call
2929 target: (identifier) @ignore
30- (#match ? @ignore "^( def| defp| defdelegate| defguard| defguardp| defmacro| defmacrop| defn| defnp| defmodule| defprotocol| defimpl| defstruct| defexception| defoverridable| alias| case| cond| else| for|if| import| quote| raise| receive| require| reraise| super| throw| try| unless| unquote| unquote_splicing| use| with)$ "))
30+ (#any-of ? @ignore "def" " defp" " defdelegate" " defguard" " defguardp" " defmacro" " defmacrop" " defn" " defnp" " defmodule" " defprotocol" " defimpl" " defstruct" " defexception" " defoverridable" " alias" " case" " cond" " else" " for" "if" " import" " quote" " raise" " receive" " require" " reraise" " super" " throw" " try" " unless" " unquote" " unquote_splicing" " use" " with"))
3131
3232; ignore module attributes
3333(unary_operator
You can’t perform that action at this time.
0 commit comments