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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[
  (repeat_stmt)
  (for_in_stmt)
  (for_range_stmt)
  (do_stmt)
  (while_stmt)
  (if_stmt)
  ; (else_clause)
  ; (elseif_clause)
  (fn_stmt)
  (local_fn_stmt)
  (anon_fn)
  (bindinglist)
  (varlist)
  (paramlist)
  (paramtypelist)
  (table)
  (cast)
  (tbtype)
  (dyntype)
  (bintype)
  (wraptype)
  (typepack)
  (attribute)
  (parattr)
  (littable)
] @indent

(
  [
    (arglist)
  ] @indent
  (#set! "scope" "all")
)

(
  [
    (explist)
    (interp_exp)
  ] @indent.always
  (#set! "scope" "all")
)

[
  "until"
  "end"
  ")"
  "}"
  "]"
] @outdent

[
  (interp_brace_close)
] @outdent.always

(ret_stmt
  "return" @expr-start
  .
  (_) @indent
  (#not-same-line? @indent @expr-start)
  (#set! "scope" "all")
)

(field
  "[" @expr-start
  .
  field_indexer: (_) @indent
  (#not-same-line? @expr-start @indent)
  (#set! "scope" "all")
)

(_
  (_) @expr-start
  .
  assign_symbol: _ @indent
  .
  (_) @expr-end
  (#not-same-line? @indent @expr-start)
  (#same-line? @expr-end @indent)
  (#set! "scope" "all")
)

(_
  (_) @expr-start
  .
  assign_symbol: _ @assign-sym
  .
  (_) @indent
  (#same-line? @expr-start @assign-sym)
  (#not-same-line? @assign-sym @indent)
  (#set! "scope" "all")
)

(ifexp
  [
    "if"
    "then"
    "elseif"
    "else"
  ] @expr-start
  .
  (_) @indent.always
  (#set! "scope" "all")
  (#not-same-line? @indent.always @expr-start)
)

(fntype
  (paramtypelist) @expr-start
  return_type: (_) @indent
  (#not-same-line? @expr-start @indent)
  (#set! "scope" "all")
)

(exp_wrap
  (_) @expr-content
  (#not-same-line? @indent @expr-content)
  (#not-kind-eq? @expr-content "ifexp")
) @indent

(else_clause
  "else" @outdent
)

(elseif_clause
  "elseif" @outdent
)