aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/cairo/indents.scm
blob: f63ef36fe8a870e8d0465dae60a6f5645b7c6126 (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
[
  (mod_item)
  (struct_item)
  (enum_item)
  (impl_item)
  (struct_expression)
  (match_expression)
  (tuple_expression)
  (match_arm)
  (match_block)
  (call_expression)
  (assignment_expression)
  (arguments)
  (block)
  (use_list)
  (field_declaration_list)
  (enum_variant_list)
  (tuple_pattern)
] @indent.begin

(import_statement
  "(") @indent.begin

(block
  "}" @indent.end)

(enum_item
  body: (enum_variant_list
    "}" @indent.end))

(match_expression
  body: (match_block
    "}" @indent.end))

(mod_item
  body: (declaration_list
    "}" @indent.end))

(struct_item
  body: (field_declaration_list
    "}" @indent.end))

(trait_item
  body: (declaration_list
    "}" @indent.end))

[
  ")"
  "]"
  "}"
] @indent.branch

[
  (comment)
  (string)
  (short_string)
] @indent.ignore