2022-08-28 23:03:39 +02:00
|
|
|
(function_item
|
2023-08-14 10:06:25 +02:00
|
|
|
body: (_) @function.inside) @function.around
|
|
|
|
|
|
|
|
(closure_expression
|
|
|
|
body: (_) @function.inside) @function.around
|
2021-10-23 04:41:19 +02:00
|
|
|
|
2022-08-28 23:03:39 +02:00
|
|
|
(struct_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2022-06-06 17:18:14 +02:00
|
|
|
|
2022-08-28 23:03:39 +02:00
|
|
|
(enum_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 04:41:19 +02:00
|
|
|
|
2022-08-28 23:03:39 +02:00
|
|
|
(union_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 04:41:19 +02:00
|
|
|
|
2022-08-28 23:03:39 +02:00
|
|
|
(trait_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 04:41:19 +02:00
|
|
|
|
2022-08-28 23:03:39 +02:00
|
|
|
(impl_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 04:41:19 +02:00
|
|
|
|
2022-05-23 14:24:30 +02:00
|
|
|
(parameters
|
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
|
|
|
|
2022-05-20 03:19:46 +02:00
|
|
|
(type_parameters
|
2022-05-23 14:24:30 +02:00
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
|
|
|
|
|
|
|
(type_arguments
|
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
2021-10-23 04:41:19 +02:00
|
|
|
|
|
|
|
(closure_parameters
|
2022-05-23 14:24:30 +02:00
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
2021-10-23 04:41:19 +02:00
|
|
|
|
|
|
|
(arguments
|
2022-05-23 14:24:30 +02:00
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
2022-03-06 06:24:24 +01:00
|
|
|
|
|
|
|
[
|
|
|
|
(line_comment)
|
|
|
|
(block_comment)
|
|
|
|
] @comment.inside
|
|
|
|
|
|
|
|
(line_comment)+ @comment.around
|
|
|
|
|
|
|
|
(block_comment) @comment.around
|
2022-06-20 04:36:33 +02:00
|
|
|
|
|
|
|
(; #[test]
|
|
|
|
(attribute_item
|
2022-11-11 23:51:58 +01:00
|
|
|
(attribute
|
2022-06-20 04:36:33 +02:00
|
|
|
(identifier) @_test_attribute))
|
|
|
|
; allow other attributes like #[should_panic] and comments
|
|
|
|
[
|
|
|
|
(attribute_item)
|
|
|
|
(line_comment)
|
|
|
|
]*
|
|
|
|
; the test function
|
|
|
|
(function_item
|
|
|
|
body: (_) @test.inside) @test.around
|
|
|
|
(#eq? @_test_attribute "test"))
|