blob: 2d48fa6fccd722fef65f1443934340fb7edd90ee (
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
|
; Class and Modules
(class
body: (_)? @class.inside) @class.around
(singleton_class
value: (_)
(_)+ @class.inside) @class.around
(call
receiver: (constant) @class_const
method: (identifier) @class_method
(#match? @class_const "Class")
(#match? @class_method "new")
(do_block (_)+ @class.inside)) @class.around
(module
body: (_)? @class.inside) @class.around
; Functions and Blocks
(singleton_method
body: (_)? @function.inside) @function.around
(method
body: (_)? @function.inside) @function.around
(do_block
body: (_)? @function.inside) @function.around
(block
body: (_)? @function.inside) @function.around
; Parameters
(method_parameters
(_) @parameter.inside) @parameter.around
(block_parameters
(_) @parameter.inside) @parameter.around
(lambda_parameters
(_) @parameter.inside) @parameter.around
; Comments
(comment) @comment.inside
(comment)+ @comment.around
|