bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#65470: 29.1.50; js-ts-mode: regex pattern can cause incorrect parent


From: Jostein Kjønigsen
Subject: bug#65470: 29.1.50; js-ts-mode: regex pattern can cause incorrect parenthesis matching
Date: Tue, 5 Sep 2023 21:31:25 +0200


> On 1 Sep 2023, at 03:42, Dmitry Gutov <dmitry@gutov.dev> wrote:
> 
> On 31/08/2023 15:53, Eli Zaretskii wrote:
>>> Date: Thu, 31 Aug 2023 14:15:22 +0300
>>> Cc:jostein@secure.kjonigsen.net,casouri@gmail.com,theo@thornhill.no,
>>>  jostein@kjonigsen.net,btuin@mailo.com,65470@debbugs.gnu.org
>>> From: Dmitry Gutov<dmitry@gutov.dev>
>>> 
>>> On 31/08/2023 12:41, Eli Zaretskii wrote:
>>>> I'm a bit confused by this discussion.  Should I install the patch on
>>>> the emacs-29 branch now, or are you still discussing whether it's
>>>> correct?
>>> I think we were discussing the typescript modes here.
>>> 
>>> Personally I was waiting for some additional confirmation that my v2 for
>>> js-ts-mode is correct, but I guess we have a silent approval, so we can
>>> install it.
>> Good to hear.  Then please install it, and thanks.
> 
> All right, installed one for js-ts-mode.

Sorry for the somewhat slow response on this. Life has been busy for me as well 
:)

Based on the infamous “copy, paste & adapt” methodology I’ve come up with a 
patch for typescript-ts-mode and tsx-ts-mode which seems to work for the simple 
test case provided above.

However the patch for js-ts-mode has lots of … interesting stuff about jsx I 
have not included, for no other reason than not understanding what type of 
use-cases they are meant to support.

If someone can provide me some examples for the JSX use-cases, I can try to 
make room for TSX-variants of the same code.

The patch so far is attached. It’s intentionally -not- optimized to leave room 
for TSX cases which may arise, so hopefully no need to nitpick this yet.

Attachment: 0001-typescript-ts-mode-Fix-syntax-properties-for-regexp-.patch
Description: Binary data


—
Jostein

reply via email to

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