2021-01-05 19:26:08 +07:00
|
|
|
[
|
|
|
|
|
(init_declarator)
|
|
|
|
|
(compound_statement)
|
|
|
|
|
(preproc_arg)
|
|
|
|
|
(field_declaration_list)
|
|
|
|
|
(case_statement)
|
2021-05-19 19:40:11 +02:00
|
|
|
(conditional_expression)
|
|
|
|
|
(enumerator_list)
|
|
|
|
|
(struct_specifier)
|
2021-07-31 12:59:19 -04:00
|
|
|
(compound_literal_expression)
|
2022-01-18 21:17:26 +06:00
|
|
|
(parameter_list)
|
|
|
|
|
(initializer_list)
|
|
|
|
|
(concatenated_string)
|
|
|
|
|
(while_statement)
|
|
|
|
|
(for_statement)
|
|
|
|
|
(switch_statement)
|
2021-01-05 19:26:08 +07:00
|
|
|
] @indent
|
2022-01-18 21:17:26 +06:00
|
|
|
(if_statement condition: (_) @indent)
|
|
|
|
|
((if_statement
|
|
|
|
|
consequence: (_) @_consequence
|
|
|
|
|
(#not-has-type? @_consequence compound_statement)
|
|
|
|
|
) @indent)
|
|
|
|
|
(init_declarator
|
|
|
|
|
value: [
|
|
|
|
|
(binary_expression)
|
|
|
|
|
] @indent)
|
2021-01-05 19:26:08 +07:00
|
|
|
|
2022-01-21 18:00:02 +06:00
|
|
|
(compound_statement "}" @indent_end)
|
|
|
|
|
|
2021-01-05 19:26:08 +07:00
|
|
|
[
|
|
|
|
|
"#define"
|
|
|
|
|
"#ifdef"
|
2022-01-18 21:17:26 +06:00
|
|
|
"#if"
|
|
|
|
|
"#else"
|
|
|
|
|
"else"
|
2021-01-05 19:26:08 +07:00
|
|
|
"#endif"
|
2022-01-18 21:17:26 +06:00
|
|
|
")"
|
2021-01-05 19:26:08 +07:00
|
|
|
"}"
|
|
|
|
|
] @branch
|
2021-03-01 20:20:37 +07:00
|
|
|
|
|
|
|
|
[
|
|
|
|
|
(comment)
|
2022-01-18 21:17:26 +06:00
|
|
|
(preproc_arg)
|
|
|
|
|
(string_literal)
|
2021-03-01 20:20:37 +07:00
|
|
|
] @ignore
|
2022-01-18 21:17:26 +06:00
|
|
|
|
|
|
|
|
(binary_expression) @auto
|