GNU bug report logs - #63957
29.0.91; c-ts-mode: incorrect fontification in alloc.c

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Thu, 8 Jun 2023 05:57:01 UTC

Severity: normal

Found in version 29.0.91

Full log


Message #23 received at 63957 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 63957 <at> debbugs.gnu.org, theo <at> thornhill.no
Subject: Re: 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 <at> gmail.com>
> Date: Mon, 12 Jun 2023 02:16:51 -0700
> Cc: Theodor Thornhill <theo <at> thornhill.no>,
>  63957 <at> 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.




This bug report was last modified 2 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.