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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Subject: bug#64922: closed (Re: bug#64922: treesit-query-error due to a
 recent change to tree-sitter-cmake grammar definition)
Date: Sat, 29 Jul 2023 19:26:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 64922 <at> debbugs.gnu.org.

-- 
64922: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64922
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: casouri <at> gmail.com, v.pupillo <at> gmail.com, 64922-done <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 22:24:59 +0300
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: v.pupillo <at> gmail.com, casouri <at> gmail.com, 64922 <at> debbugs.gnu.org
> Date: Sat, 29 Jul 2023 21:19:38 +0200
> 
> Installed.

Thanks!

[Message part 3 (message/rfc822, inline)]
From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: treesit-query-error due to a recent change to tree-sitter-cmake
 grammar definition
Date: Fri, 28 Jul 2023 22:59:27 +0200
[Message part 4 (text/plain, inline)]
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.
Vincenzo
[0001-Updated-CMake-support-due-to-changes-in-tree-sitter-.patch (text/x-patch, attachment)]

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.