Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/julia/locals.scm')
| -rw-r--r-- | runtime/queries/julia/locals.scm | 66 |
1 files changed, 9 insertions, 57 deletions
diff --git a/runtime/queries/julia/locals.scm b/runtime/queries/julia/locals.scm index bbf72c0e..b587e731 100644 --- a/runtime/queries/julia/locals.scm +++ b/runtime/queries/julia/locals.scm @@ -2,81 +2,30 @@ ; Definitions ; ----------- -; Variables -(assignment - (identifier) @local.definition) - -(assignment - (tuple_expression - (identifier) @local.definition)) - ; Constants (const_statement (assignment - . (identifier) @local.definition)) - -; let/const bindings -(let_binding - (identifier) @local.definition) - -(let_binding - (tuple_expression - (identifier) @local.definition)) - -; For bindings -(for_binding - (identifier) @local.definition) - -(for_binding - (tuple_expression - (identifier) @local.definition)) - -; Types -(struct_definition - name: (identifier) @local.definition) - -(abstract_definition - name: (identifier) @local.definition) - -(abstract_definition - name: (identifier) @local.definition) - -(type_parameter_list - (identifier) @local.definition) - -; Module imports -(import_statement - (identifier) @local.definition) + . (identifier) @local.definition.constant)) ; Parameters (parameter_list - (identifier) @local.definition) + (identifier) @local.definition.variable.parameter) (optional_parameter . - (identifier) @local.definition) + (identifier) @local.definition.variable.parameter) (slurp_parameter - (identifier) @local.definition) + (identifier) @local.definition.variable.parameter) (typed_parameter - parameter: (identifier) @local.definition + parameter: (identifier) @local.definition.variable.parameter (_)) ; Single parameter arrow function (function_expression . - (identifier) @local.definition) - -; Function/macro definitions -(function_definition - name: (identifier) @local.definition) @local.scope - -(short_function_definition - name: (identifier) @local.definition) @local.scope - -(macro_definition - name: (identifier) @local.definition) @local.scope + (identifier) @local.definition.variable.parameter) ; ---------- ; References @@ -97,5 +46,8 @@ (let_statement) (quote_statement) (do_clause) + (function_definition) + (short_function_definition) + (macro_definition) ] @local.scope |