Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/ecma/locals.scm')
-rw-r--r--runtime/queries/ecma/locals.scm17
1 files changed, 10 insertions, 7 deletions
diff --git a/runtime/queries/ecma/locals.scm b/runtime/queries/ecma/locals.scm
index 594a5f50..cc5f2e14 100644
--- a/runtime/queries/ecma/locals.scm
+++ b/runtime/queries/ecma/locals.scm
@@ -3,22 +3,25 @@
[
(statement_block)
+ (function)
(arrow_function)
- (function_expression)
(function_declaration)
(method_definition)
- (for_statement)
- (for_in_statement)
- (catch_clause)
- (finally_clause)
] @local.scope
; Definitions
;------------
-; i => ...
+(pattern/identifier) @local.definition
+
+(pattern/rest_pattern
+ (identifier) @local.definition)
+
(arrow_function
- parameter: (identifier) @local.definition.variable.parameter)
+ parameter: (identifier) @local.definition)
+
+(variable_declarator
+ name: (identifier) @local.definition)
; References
;------------