From 92417aa4ea3a77d34a5b8e2f526cc8bd7c0d4ded Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Tue, 2 Jun 2020 21:13:09 +0200 Subject: Update python locals: `list_splat` and `dictionary_splat` define variables as parameters --- queries/python/locals.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'queries/python/locals.scm') diff --git a/queries/python/locals.scm b/queries/python/locals.scm index bc33d306b..735271663 100644 --- a/queries/python/locals.scm +++ b/queries/python/locals.scm @@ -14,6 +14,20 @@ parameters: (parameters (identifier) @definition.var)) +; *args parameter +(function_definition + name: (identifier) + parameters: (parameters + (list_splat + (identifier) @definition.var))) + +; **kwargs parameter +(function_definition + name: (identifier) + parameters: (parameters + (dictionary_splat + (identifier) @definition.var))) + ; Function defines function and scope (function_definition name: (identifier) @definition.function) @scope -- cgit v1.2.3-70-g09d2