Debian Codegraph @

runtime/queries/cairo/textobjects.scm

raw symbols SCIP
1 (function_item
2 body: (_) @function.inside) @function.around
3
4 (closure_expression
5 body: (_) @function.inside) @function.around
6
7 (struct_item
8 body: (_) @class.inside) @class.around
9
10 (enum_item
11 body: (_) @class.inside) @class.around
12
13 (trait_item
14 body: (_) @class.inside) @class.around
15
16 (impl_item
17 body: (_) @class.inside) @class.around
18
19 (parameters
20 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
21
22 (closure_parameters
23 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
24
25 (type_parameters
26 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
27
28 (type_arguments
29 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
30
31 (arguments
32 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
33
34 (field_initializer_list
35 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
36
37 [
38 (line_comment)
39 ] @comment.inside
40
41 (line_comment)+ @comment.around
42
43 (; #[test]
44 (attribute_item
45 (attribute
46 (identifier) @_test_attribute))
47 ; allow other attributes like #[should_panic] and comments
48 [
49 (attribute_item)
50 (line_comment)
51 ]*
52 ; the test function
53 (function_item
54 body: (_) @test.inside) @test.around
55 (#eq? @_test_attribute "test"))
56
57 (array_expression
58 (_) @entry.around)
59
60 (tuple_expression
61 (_) @entry.around)
62
63 (tuple_pattern
64 (_) @entry.around)
65
66 ; Commonly used vec macro initializer is special cased
67 (macro_invocation
68 (identifier) @_id (token_tree (_) @entry.around)
69 (#eq? @_id "array"))
70
71 (enum_variant) @entry.around
72
73 (field_declaration
74 (_) @entry.inside) @entry.around
75
76 (field_initializer
77 (_) @entry.inside) @entry.around
78
79 (shorthand_field_initializer) @entry.around