mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
fix(c_indents): fix expression leaking indents
This commit is contained in:
parent
474c59dcf1
commit
9161093fc7
3 changed files with 46 additions and 1 deletions
23
tests/indent/c/issue-4525.c
Normal file
23
tests/indent/c/issue-4525.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
char *a = "a" "b" "c" D;
|
||||
|
||||
static int a, b, c;
|
||||
a = b = c = 0;
|
||||
|
||||
static int d = 0, e = 0, f = 0;
|
||||
|
||||
int main(void) {
|
||||
printf("String" PRIu64 "\n", (uint64_t)0);
|
||||
printf("String" AND_ERROR_NODE "and string");
|
||||
fflush(stdout);
|
||||
a = 0; b = 0; c = 0;
|
||||
int x = 0; int y = 0; int z = 0;
|
||||
foo(1, 2);
|
||||
x++;
|
||||
a = b
|
||||
= c
|
||||
= d;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue