emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/tree-sitter 88d54756d4 2/2: Check for outdated tree-sitter n


From: Yuan Fu
Subject: Re: feature/tree-sitter 88d54756d4 2/2: Check for outdated tree-sitter node when printing
Date: Wed, 2 Nov 2022 20:51:20 -0700


> On Nov 2, 2022, at 8:18 PM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> +bool treesit_node_uptodate_p (Lisp_Object obj)
>> +{
>> +  Lisp_Object lisp_parser = XTS_NODE (obj)->parser;
>> +  return XTS_NODE (obj)->timestamp == XTS_PARSER (lisp_parser)->timestamp;
>> +}
> 
> This should be:
> 
> bool
> treesit_node_uptodate_p (Lisp_Object object)
> {
>  ...
> 
>> +bool treesit_node_uptodate_p (Lisp_Object obj);
> 
> This should read "extern bool treesit_node_uptodate_p (Lisp_Object)".

Cool, thanks. I’ll fix them.

> 
> BTW, does the modification to the style patch I asked you to test work?
> You either didn't answer, or it fell into the spam bucket (but I looked
> and found nothing there.)

Ah yes, sorry. I though you are going to change your patch and forgot to follow 
up. Everything indeed works, except for the following

-  return Fmapconcat (intern_c_string ("treesit-pattern-expand"),
-                    query, build_pure_c_string (" "));
+  return Fmapconcat (Qtreesit_pattern_expand,

Which breaks a test. Why remove the space? Tree-sitter probably can parse it 
fine without the spaces, but the result is also viewed by users in some cases, 
where spaces are much appreciated.

Yuan


reply via email to

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