Unnamed repository; edit this file 'description' to name the repository.
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
67
68
69
70
71
72
73
74
75
76
77
78
; (stmt_let) @assignment.outer

; (stmt_mut) @assignment.outer

; (stmt_const) @assignment.outer

; (stmt_let
;   value: (_) @assignment.inner)

; (stmt_mut
;   value: (_) @assignment.inner)

; (stmt_const
;   value: (_) @assignment.inner)

; (block) @block.outer

(comment) @comment.around

; (pipeline) @pipeline.outer

; (pipe_element) @pipeline.inner

(decl_def) @function.around

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

; (ctrl_for) @loop.outer

; (ctrl_loop) @loop.outer

; (ctrl_while) @loop.outer

; (ctrl_for
;   body: (_) @loop.inner)

; (ctrl_loop
;   body: (_) @loop.inner)

; (ctrl_while
;   body: (_) @loop.inner)

; Conditional inner counts the last one, rather than the current one.
; (ctrl_if
;   then_branch: (_) @conditional.inner
;   else_block: (_)? @conditional.inner) @conditional.outer

(parameter) @parameter.around

; (command
;   head: (_) @call.inner) @call.outer

; (where_command
;   predicate: (_) @call.inner) @call.outer

; define pipeline first, because it should only match as a fallback
; e.g., `let a = date now` should match the whole assignment.
; But a standalone `date now` should also match a statement
; (pipeline) @statement.outer

; (stmt_let) @statement.outer

; (stmt_mut) @statement.outer

; (stmt_const) @statement.outer

; (ctrl_if) @statement.outer

; (ctrl_try) @statement.outer

; (ctrl_match) @statement.outer

; (ctrl_while) @statement.outer

; (ctrl_loop) @statement.outer

; (val_number) @number.inner