GNU bug report logs - #64922
treesit-query-error due to a recent change to tree-sitter-cmake grammar definition

Previous Next

Package: emacs;

Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>

Date: Fri, 28 Jul 2023 21:00:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 64922 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>,
 Theodor Thornhill <theo <at> thornhill.no>, Yuan Fu <casouri <at> gmail.com>
Cc: 64922 <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to
 tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 10:51:19 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Date: Fri, 28 Jul 2023 22:59:27 +0200
> 
> Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed 
> the definition of the cmake grammar, now there is a new node argument_list used 
> to wrap nodes of type argument. 
> This causes the following error:
> Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error 
> "Structure error at" 19 "((foreach_command ((argument) @font-lock-constant-
> face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\|
> ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) 
> @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\
> \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\
> (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\
> \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\
> \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\
> \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query-
> validate'")
> 
> The attached patch supports both the old and the new grammar.

Thanks.

Theo, yuan: any comments to the patch?  If okay, I'd like to install
this on the release branch ASAP.




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

Previous Next


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