summaryrefslogtreecommitdiff
path: root/runtime/queries/tact/textobjects.scm
blob: 54d07014e06e687337b08cb4252eb969852c3975 (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
; function.inside & around
; ------------------------

(static_function
  body: (_) @function.inside) @function.around

(init_function
  body: (_) @function.inside) @function.around

(bounced_function
  body: (_) @function.inside) @function.around

(receive_function
  body: (_) @function.inside) @function.around

(external_function
  body: (_) @function.inside) @function.around

(function
  body: (_) @function.inside) @function.around

; class.inside & around
; ---------------------

(struct
  body: (_) @class.inside) @class.around

(message
  body: (_) @class.inside) @class.around

(contract
  body: (_) @class.inside) @class.around

; NOTE: Marked as @definition.interface in tags, as it's semantically correct
(trait
  body: (_) @class.inside) @class.around

; parameter.inside & around
; -------------------------

(parameter_list
  ((_) @parameter.inside . ","? @parameter.around) @parameter.around)

(argument_list
  ((_) @parameter.inside . ","? @parameter.around) @parameter.around)

(instance_argument_list
  ((_) @parameter.inside . ","? @parameter.around) @parameter.around)

; comment.inside
; --------------

(comment) @comment.inside

; comment.around
; --------------

(comment)+ @comment.around