summaryrefslogtreecommitdiff
path: root/runtime/queries/sway/locals.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/sway/locals.scm')
-rw-r--r--runtime/queries/sway/locals.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/queries/sway/locals.scm b/runtime/queries/sway/locals.scm
new file mode 100644
index 00000000..262d609e
--- /dev/null
+++ b/runtime/queries/sway/locals.scm
@@ -0,0 +1,17 @@
+; Scopes
+
+[
+ (function_item)
+ (closure_expression)
+ (block)
+] @local.scope
+
+; Definitions
+
+(parameter
+ (identifier) @local.definition)
+
+(closure_parameters (identifier) @local.definition)
+
+; References
+(identifier) @local.reference