2021-09-06 11:13:52 +02:00
|
|
|
; Scopes
|
|
|
|
|
2022-08-06 12:58:06 +02:00
|
|
|
[
|
|
|
|
(function_item)
|
2023-11-03 22:21:01 +01:00
|
|
|
(struct_item)
|
|
|
|
(enum_item)
|
|
|
|
(union_item)
|
|
|
|
(type_item)
|
|
|
|
(trait_item)
|
|
|
|
(impl_item)
|
2022-08-06 12:58:06 +02:00
|
|
|
(closure_expression)
|
|
|
|
(block)
|
|
|
|
] @local.scope
|
2021-09-06 11:13:52 +02:00
|
|
|
|
|
|
|
; Definitions
|
|
|
|
|
|
|
|
(parameter
|
|
|
|
(identifier) @local.definition)
|
|
|
|
|
2023-11-03 22:21:01 +01: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 04:51:35 +02:00
|
|
|
(closure_parameters (identifier) @local.definition)
|
2021-09-06 11:13:52 +02:00
|
|
|
|
|
|
|
; References
|
|
|
|
(identifier) @local.reference
|
2023-11-03 22:21:01 +01:00
|
|
|
(type_identifier) @local.reference
|