2021-09-06 13:13:52 +04:00
|
|
|
; Scopes
|
|
|
|
|
2022-08-06 14:58:06 +04:00
|
|
|
[
|
|
|
|
(function_item)
|
2023-11-04 01:21:01 +04:00
|
|
|
(struct_item)
|
|
|
|
(enum_item)
|
|
|
|
(union_item)
|
|
|
|
(type_item)
|
|
|
|
(trait_item)
|
|
|
|
(impl_item)
|
2022-08-06 14:58:06 +04:00
|
|
|
(closure_expression)
|
|
|
|
(block)
|
|
|
|
] @local.scope
|
2021-09-06 13:13:52 +04:00
|
|
|
|
|
|
|
; Definitions
|
|
|
|
|
|
|
|
(parameter
|
|
|
|
(identifier) @local.definition)
|
|
|
|
|
2023-11-04 01:21:01 +04:00
|
|
|
(type_parameters
|
|
|
|
(type_identifier) @local.definition)
|
|
|
|
(constrained_type_parameter
|
|
|
|
left: (type_identifier) @local.definition)
|
|
|
|
(optional_type_parameter
|
|
|
|
name: (type_identifier) @local.definition)
|
|
|
|
|
2022-07-20 06:51:35 +04:00
|
|
|
(closure_parameters (identifier) @local.definition)
|
2021-09-06 13:13:52 +04:00
|
|
|
|
|
|
|
; References
|
|
|
|
(identifier) @local.reference
|
2023-11-04 01:21:01 +04:00
|
|
|
(type_identifier) @local.reference
|