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

Previous Next

Package: emacs;

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

Date: Sat, 15 Jul 2023 12:35: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: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Theodor Thornhill <theo <at> thornhill.no>
Cc: 64647 <at> debbugs.gnu.org, jostein <at> kjonigsen.net
Subject: bug#64647: treesit-query-error due to a recent change to tree-sitter-javascript grammar definition
Date: Thu, 20 Jul 2023 12:14:07 +0200
[Message part 1 (text/plain, inline)]
In data mercoledì 19 luglio 2023 07:11:05 CEST, Theodor Thornhill ha scritto:

> For Typescript these changes should go into 'tsx-ts-mode, not
> 'typescript-ts-mode. That may be why you are seeing some strange results?
No, exactly the same problem occurs, unfortunately. After all, the sources of 
libtree-sitter-tsx and libtree-sitter-typescript come from the same repository 
and the content of  tree-sitter-typescript/tsx/grammar.js is just that:
const defineGrammar = require('../common/define-grammar');
module.exports = defineGrammar('tsx');


> > ---
> 
> "... function to handle ..."

fixed


> "Indent rules helper, to handle different releases of
> tree-sitter-javascript."

fixed


> 
> The indentation here looks off. Can you format this?
> 

fixed

> 
> This seems to not be properly converted to tsx from javascript, both in
> the docstring and code.  Also, I think the name is wrong. Maybe it
> should describe its intent a little more closely, something like
> "tsx-ts-mode--indent-compatibility-b893426"?


Sorry for the error. I fixed them, tested and fixed the function names according to your instructions (also in js.el)
Hope the patches are better now.
Thanks.
Vincenzo


[0002-Updated-TSX-support-due-to-changes-in-tree-sitter-ty.patch (text/x-patch, attachment)]
[0001-Updated-JSX-support-due-to-changes-in-tree-sitter-ja.patch (text/x-patch, attachment)]

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

Previous Next


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