GNU bug report logs - #59435
29.0.50; tree-sitter fails to fontify or indent simple function

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Mon, 21 Nov 2022 06:11:01 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 59435 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple function
Date: Mon, 21 Nov 2022 15:53:44 +0200
> Cc: 59435 <at> debbugs.gnu.org
> Date: Mon, 21 Nov 2022 19:57:08 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> > As for ifsubmitbufl, tbase, and l, I don’t really understand the
> > syntax here, and I think neither does tree-sitter . In general
> > tree-sitter struggles with nonstandard (in its book anyway) syntax.
> 
> Well, that code is 100% valid C.

It's K&R C, which is used very rarely these days, and it sounds like the
next version of GCC will reject it, since C2x makes it invalid.

So I see no catastrophe that c-ts-mode doesn't support this.  You can always
opt not to use c-ts-mode if you need this style supported.  Of course, if
tree-sitter's parser is updated to add such support, we'll all be happier.




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

Previous Next


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