blob: 0573cf6db8b7a93ded94dadb01abf4dd45f10b63 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
; References
(identifier) @local.reference
((type_identifier) @local.reference
(#set! reference.kind "type"))
((field_identifier) @local.reference
(#set! reference.kind "field"))
; Scopes
[
(program)
(block)
(function_definition)
(loop_expression)
(if_expression)
(match_expression)
(match_arm)
(struct_item)
(enum_item)
(impl_item)
] @local.scope
(use_declaration
argument: (scoped_identifier
name: (identifier) @local.definition.import))
(use_as_clause
alias: (identifier) @local.definition.import)
(use_list
(identifier) @local.definition.import) ; use std::process::{Child, Command, Stdio};
; Functions
(function_definition
(identifier) @local.definition.function)
(function_definition
(identifier) @local.definition.method
(parameter
(self)))
; Function with parameters, defines parameters
(parameter
[
(identifier)
(self)
] @local.definition.parameter)
; Types
(struct_item
name: (type_identifier) @local.definition.type)
(constrained_type_parameter
left: (type_identifier) @local.definition.type) ; the P in remove_file<P: AsRef<Path>>(path: P)
(enum_item
name: (type_identifier) @local.definition.type)
; Module
(mod_item
name: (identifier) @local.definition.namespace)
; Variables
(assignment_expression
left: (identifier) @local.definition.var)
|