From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 63957@debbugs.gnu.org, theo@thornhill.no
Subject: bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c
Date: Mon, 12 Jun 2023 15:38:22 +0300 [thread overview]
Message-ID: <83h6rcyhxd.fsf@gnu.org> (raw)
In-Reply-To: <14362329-D74B-42C9-879D-CE61CA6969A6@gmail.com> (message from Yuan Fu on Mon, 12 Jun 2023 02:16:51 -0700)
> 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.
prev parent reply other threads:[~2023-06-12 12:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 5:56 bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c Eli Zaretskii
2023-06-08 6:00 ` Eli Zaretskii
2023-06-08 7:19 ` Yuan Fu
2023-06-10 6:51 ` Yuan Fu
2023-06-10 8:11 ` Eli Zaretskii
2023-06-12 9:16 ` Yuan Fu
2023-06-12 12:38 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h6rcyhxd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63957@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).