aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/rust
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-09-06 09:13:52 +0000
committerBlaž Hrastnik2021-09-06 09:13:52 +0000
commit4ac29434cb99b517dba3752a287c0edfe8679e7e (patch)
tree7d7c7e224f5313bf38ea0fb8fdfcb87f2b44b7ae /runtime/queries/rust
parent2bef245b7a1ae11f023d3e3aa82df250a3488d91 (diff)
syntax: Add go & rust locals, improve tree-sitter error message
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r--runtime/queries/rust/locals.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/queries/rust/locals.scm b/runtime/queries/rust/locals.scm
new file mode 100644
index 00000000..6428f9b4
--- /dev/null
+++ b/runtime/queries/rust/locals.scm
@@ -0,0 +1,17 @@
+; Scopes
+
+(block) @local.scope
+
+; Definitions
+
+(parameter
+ (identifier) @local.definition)
+
+(let_declaration
+ pattern: (identifier) @local.definition)
+
+(closure_parameters (identifier)) @local.definition
+
+; References
+(identifier) @local.reference
+