GNU bug report logs - #66988
30.0.50; treesit-forward-sexp not working properly in js-ts-mode and tsx-ts-mode

Previous Next

Package: emacs;

Reported by: Loïc Lemaître <loic.lemaitre <at> gmail.com>

Date: Tue, 7 Nov 2023 16:20:01 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Loïc Lemaître <loic.lemaitre <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>, 66988 <at> debbugs.gnu.org, Yuan Fu <casouri <at> gmail.com>, Theodor Thornhill <theo <at> thornhill.no>
Subject: bug#66988: 30.0.50; treesit-forward-sexp not working properly in js-ts-mode and tsx-ts-mode
Date: Sun, 12 Nov 2023 13:10:14 +0100
Sorry for my example that is actually not valid JSX...
Yours demontrates better the remaining issue.

Thanks

Loïc

Le 12/11/2023 à 00:40, Dmitry Gutov a écrit :
> On 11/11/2023 17:43, Loïc Lemaître wrote:
>> Thanks for the patch ! It fixes the bug.
>> But unfortunatly, there is another similar bug in 
>> /treesit-forward-sexp/, that you can reproduce with that example:
>> ({(<A></A>)});
>
> The problem in this case is that the code doesn't parse (one of the 
> nodes in the parse tree is ERROR). Removing either the curlies, or the 
> outer parens pair makes the code valid and the behavior 
> correspondingly better.
>
> Although for treesit-forward-sexp to jump between curlies in
>
>   {(<A></A>)};
>
> we'll also need to add "statement_block" to js--treesit-sexp-nodes.




This bug report was last modified 1 year and 127 days ago.

Previous Next


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