summaryrefslogtreecommitdiff
path: root/runtime/queries/matlab/locals.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/matlab/locals.scm')
-rw-r--r--runtime/queries/matlab/locals.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/queries/matlab/locals.scm b/runtime/queries/matlab/locals.scm
new file mode 100644
index 00000000..d0589a1d
--- /dev/null
+++ b/runtime/queries/matlab/locals.scm
@@ -0,0 +1,19 @@
+(function_definition name: (identifier) @local.definition ?) @local.scope
+(function_arguments (identifier)* @local.definition)
+
+(lambda (arguments (identifier) @local.definition)) @local.scope
+
+(assignment left: ((function_call
+ name: (identifier) @local.definition)))
+(assignment left: ((field_expression . [(function_call
+ name: (identifier) @local.definition)
+ (identifier) @local.definition])))
+(assignment left: (_) @local.definition)
+(assignment (multioutput_variable (_) @local.definition))
+
+(iterator . (identifier) @local.definition)
+(global_operator (identifier) @local.definition)
+(persistent_operator (identifier) @local.definition)
+(catch_clause (identifier) @local.definition)
+
+(identifier) @local.reference