aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python
diff options
context:
space:
mode:
Diffstat (limited to 'queries/python')
-rw-r--r--queries/python/locals.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/queries/python/locals.scm b/queries/python/locals.scm
new file mode 100644
index 000000000..763d1b77d
--- /dev/null
+++ b/queries/python/locals.scm
@@ -0,0 +1,65 @@
+;;; Programm structure
+(module) @scope
+
+(class_definition
+ body: (block
+ (expression_statement
+ (assignment
+ left: (expression_list
+ (identifier) @definition.associated))))) @scope
+
+; Function with parameters, defines parameters
+(function_definition
+ name: (identifier)
+ parameters: (parameters
+ (identifier) @definition.var))