This commit is contained in:
Paul Gauthier 2025-02-07 14:26:59 -08:00
parent b0aa4ef4c8
commit 17993ef9ff
4 changed files with 17 additions and 11 deletions

View file

@ -25,7 +25,7 @@
(comment)* @doc
.
[
(function
(function_expression
name: (identifier) @name.definition.function)
(function_declaration
name: (identifier) @name.definition.function)
@ -44,7 +44,7 @@
(lexical_declaration
(variable_declarator
name: (identifier) @name.definition.function
value: [(arrow_function) (function)]) @definition.function)
value: [(arrow_function) (function_expression)]) @definition.function)
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
(#select-adjacent! @doc @definition.function)
)
@ -55,7 +55,7 @@
(variable_declaration
(variable_declarator
name: (identifier) @name.definition.function
value: [(arrow_function) (function)]) @definition.function)
value: [(arrow_function) (function_expression)]) @definition.function)
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
(#select-adjacent! @doc @definition.function)
)
@ -66,12 +66,12 @@
(member_expression
property: (property_identifier) @name.definition.function)
]
right: [(arrow_function) (function)]
right: [(arrow_function) (function_expression)]
) @definition.function
(pair
key: (property_identifier) @name.definition.function
value: [(arrow_function) (function)]) @definition.function
value: [(arrow_function) (function_expression)]) @definition.function
(
(call_expression