2022-08-29 01:03:39 +04:00
|
|
|
(function_item
|
|
|
|
body: (_) @function.inside) @function.around(closure_expression body: (_) @function.inside) @function.around
|
2021-10-23 06:41:19 +04:00
|
|
|
|
2022-08-29 01:03:39 +04:00
|
|
|
(struct_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2022-06-06 19:18:14 +04:00
|
|
|
|
2022-08-29 01:03:39 +04:00
|
|
|
(enum_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 06:41:19 +04:00
|
|
|
|
2022-08-29 01:03:39 +04:00
|
|
|
(union_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 06:41:19 +04:00
|
|
|
|
2022-08-29 01:03:39 +04:00
|
|
|
(trait_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 06:41:19 +04:00
|
|
|
|
2022-08-29 01:03:39 +04:00
|
|
|
(impl_item
|
|
|
|
body: (_) @class.inside) @class.around
|
2021-10-23 06:41:19 +04:00
|
|
|
|
2022-05-23 16:24:30 +04:00
|
|
|
(parameters
|
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
|
|
|
|
2022-05-20 05:19:46 +04:00
|
|
|
(type_parameters
|
2022-05-23 16:24:30 +04:00
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
|
|
|
|
|
|
|
(type_arguments
|
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
2021-10-23 06:41:19 +04:00
|
|
|
|
|
|
|
(closure_parameters
|
2022-05-23 16:24:30 +04:00
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
2021-10-23 06:41:19 +04:00
|
|
|
|
|
|
|
(arguments
|
2022-05-23 16:24:30 +04:00
|
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
2022-03-06 09:24:24 +04:00
|
|
|
|
|
|
|
[
|
|
|
|
(line_comment)
|
|
|
|
(block_comment)
|
|
|
|
] @comment.inside
|
|
|
|
|
|
|
|
(line_comment)+ @comment.around
|
|
|
|
|
|
|
|
(block_comment) @comment.around
|
2022-06-20 06:36:33 +04:00
|
|
|
|
|
|
|
(; #[test]
|
|
|
|
(attribute_item
|
2022-11-12 02:51:58 +04:00
|
|
|
(attribute
|
2022-06-20 06:36:33 +04: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"))
|