emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree sitter support for C-like languages


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]