feat(c): Add switch and case support

This commit is contained in:
btolsch 2024-01-24 02:30:50 -08:00 committed by GitHub
parent 85cf977181
commit 2972717355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 0 deletions

View file

@ -38,3 +38,11 @@
(enum_specifier
body: (_ (_) @context.end)
) @context
(switch_statement
body: (_) @context.end
) @context
(case_statement
value: (_) (_) @context.end
) @context

View file

@ -116,4 +116,33 @@ int main(int arg1,
// comment
}
switch (arg1) {
// comment
// comment
case 0:
// comment
// comment
// comment
// comment
// comment
// comment
// comment
// comment
// comment
// comment
break;
case 1: {
// comment
// comment
// comment
// comment
// comment
// comment
// comment
// comment
// comment
// comment
} break;
}
}