[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c
From: |
Eli Zaretskii |
Subject: |
bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c |
Date: |
Mon, 12 Jun 2023 15:38:22 +0300 |
> From: Yuan Fu <casouri@gmail.com>
> Date: Mon, 12 Jun 2023 02:16:51 -0700
> Cc: Theodor Thornhill <theo@thornhill.no>,
> 63957@debbugs.gnu.org
>
> If we add preproc directives:
>
> struct A
> {
> #if A
> int a;
> #else
> int b;
> }
> #endif
>
> Now the parser will parse the "struct A {“ individually; parse “int a;”
> individually; and parse “int b; }” individually.
>
> So in general, if a preproc directives butchers some construct, the first
> part is usually fine (eg, the “struct A {“ part), but the rest often have
> problems. Like a dangling “else if {}” in if-else-if, or a dangling “xxx }”
> in a function definition, or maybe a “default: xxx }” in a switch-case.
Thanks.