feat: rewrite indent module

This commit is contained in:
Munif Tanjim 2022-01-18 21:17:26 +06:00 committed by Christian Clason
parent baf94219aa
commit c0110e34aa
13 changed files with 136 additions and 182 deletions

View file

@ -8,18 +8,38 @@
(enumerator_list)
(struct_specifier)
(compound_literal_expression)
(parameter_list)
(initializer_list)
(concatenated_string)
(while_statement)
(for_statement)
(switch_statement)
] @indent
(if_statement condition: (_) @indent)
((if_statement
consequence: (_) @_consequence
(#not-has-type? @_consequence compound_statement)
) @indent)
(init_declarator
value: [
(binary_expression)
] @indent)
[
"#define"
"#ifdef"
"#if"
"#else"
"else"
"#endif"
"{"
")"
"}"
] @branch
[
(comment)
(preproc_function_def)
(preproc_arg)
(string_literal)
] @ignore
(binary_expression) @auto