aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/tiger/indents.scm
blob: 686bfde16d128f7b0caab5565027d864662b2a76 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
; Control flow {{{
(if_expression) @indent.begin

"then" @indent.branch

"else" @indent.branch

(while_expression) @indent.begin

"do" @indent.branch

(for_expression) @indent.begin

"to" @indent.branch

; }}}
; Class {{{
(class_declaration) @indent.begin

(class_declaration
  "}" @indent.end)

(class_type) @indent.begin

(class_type
  "}" @indent.end)

; }}}
; Groups {{{
(let_expression) @indent.begin

"in" @indent.branch

"end" @indent.branch

(let_expression
  "end" @indent.end)

(sequence_expression) @indent.begin

")" @indent.branch

(sequence_expression
  ")" @indent.end)

; }}}
; Functions and methods {{{
(parameters) @indent.begin

(parameters
  ")" @indent.end)

(function_call) @indent.begin

(function_call
  ")" @indent.end)

(method_call) @indent.begin

")" @indent.branch

(function_declaration) @indent.begin

(primitive_declaration) @indent.begin

(method_declaration) @indent.begin

; }}}
; Values and expressions {{{
(array_value) @indent.begin

"]" @indent.branch

(array_value
  "]" @indent.end)

(array_expression) @indent.begin

"of" @indent.branch

(record_expression) @indent.begin

"}" @indent.branch

(record_expression
  "}" @indent.end)

(record_type) @indent.begin

"}" @indent.branch

(record_type
  "}" @indent.end)

(variable_declaration) @indent.begin

; }}}
; Misc{{{
(comment) @indent.ignore

(string_literal) @indent.ignore

; }}}
; vim: sw=2 foldmethod=marker