A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00875.html below:

Re: Tree sitter support for C-like languages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Yuan Fu Subject: Re: Tree sitter support for C-like languages Date: Mon, 14 Nov 2022 10:31:15 -0800
> On Nov 14, 2022, at 5:24 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Mon, 14 Nov 2022 00:35:47 -0800
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> Theodor Thornhill <theo@thornhill.no>,
>> emacs-devel <emacs-devel@gnu.org>,
>> monnier@iro.umontreal.ca
>> 
>> That’s a good perspective. But from what I see I think it’s best not to 
>> fontify these “errors”, at least for C and C++. Because a lot of things 
>> could be marked “error” in a C file, like stuff around macros. And in 
>> extreme cases the whole file is marked “error”, even though if we ignore the 
>> error everything is parsed fine. I guess tree-sitter isn’t happy about some 
>> tiny thing in that file but never the less can parse everything correctly. I 
>> attached that file below.
> 
> If these false positives happen frequently, it could be a user option;
> some users will prefer false positives to false negatives.  But I
> definitely think that the warning face can be a valuable feature in
> some use cases, so flatly dismissing it is probably not the best
> alternative.

Right. And I expect false positives to be low in any language that’s not C/C++ 
(because macros). Let’s see what can we do.

Yuan


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4