Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/erlang/locals.scm')
| -rw-r--r-- | runtime/queries/erlang/locals.scm | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/runtime/queries/erlang/locals.scm b/runtime/queries/erlang/locals.scm index 156e4038..e2212cac 100644 --- a/runtime/queries/erlang/locals.scm +++ b/runtime/queries/erlang/locals.scm @@ -1,30 +1,25 @@ ; Specs and Callbacks (attribute (stab_clause - pattern: (arguments (variable)? @local.definition) + pattern: (arguments (variable)? @local.definition.variable.parameter) ; If a spec uses a variable as the return type (and later a `when` clause to type it): - body: (variable)? @local.definition)) @local.scope + body: (variable)? @local.definition.variable.parameter)) @local.scope ; parametric `-type`s ((attribute name: (atom) @_type (arguments (binary_operator - left: (call (arguments (variable) @local.definition)) + left: (call (arguments (variable) @local.definition.variable.parameter)) operator: "::") @local.scope)) (#match? @_type "(type|opaque)")) -; macros -((attribute - name: (atom) @_define - (arguments - (call (arguments (variable) @local.definition)))) @local.scope - (#eq? @_define "define")) - ; `fun`s -(anonymous_function (stab_clause pattern: (arguments (variable) @local.definition))) @local.scope +(anonymous_function (stab_clause pattern: (arguments (variable) @local.definition.variable.parameter))) @local.scope ; Ordinary functions -(function_clause pattern: (arguments (variable) @local.definition)) @local.scope +((function_clause + pattern: (arguments (variable) @local.definition.variable.parameter)) @local.scope + (#not-match? @local.definition.variable.parameter "^_")) (variable) @local.reference |