Received: (at 61303) by debbugs.gnu.org; 5 Feb 2023 22:27:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 05 17:27:03 2023
Received: from localhost ([127.0.0.1]:46667 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1pOnTT-00020o-6k
for submit <at> debbugs.gnu.org; Sun, 05 Feb 2023 17:27:03 -0500
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:44229)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <jostein@HIDDEN>) id 1pOnTR-0001zk-8F
for 61303 <at> debbugs.gnu.org; Sun, 05 Feb 2023 17:27:01 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
by mailout.west.internal (Postfix) with ESMTP id 6D27F32005D8;
Sun, 5 Feb 2023 17:26:54 -0500 (EST)
Received: from imap50 ([10.202.2.100])
by compute3.internal (MEProxy); Sun, 05 Feb 2023 17:26:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
secure.kjonigsen.net; h=cc:cc:content-type:date:date:from:from
:in-reply-to:in-reply-to:message-id:mime-version:references
:reply-to:reply-to:sender:subject:subject:to:to; s=fm2; t=
1675636014; x=1675722414; bh=Q/FJRL9x04pXZqiZC3nT+Ed+E+PSA9eFStm
m+tduSm0=; b=PgvplY1bO9+EcZ5zYv2ZGdCRIBxJHxvT8qntK5YYyluv6fNWoYV
gzWaSEkIegI1VxguI12Bvzp9NpCTe4oGR/55KB4UNgAk775dmgIcBfdNk2X6NnFa
D5mpRgCwJmDGdG5cRrXY+AZL++/JsQBCEh9LbZROqSGqpB+lLXn865MLMdNcY9VA
IKkOx853NR0bqeMVMUptGM7BMhSJrR70vPVTHvvpZc+kvnrkeJ3auR9jy6ljTNve
NfWjpr2M9CsFoU/FU4Dy7piDCKs98HW+kyer+kAZkOVPX6OGNO7s7eztYyny1bo6
Xjo00E3E0H//DM48y72rOXj3r/itiRQaxjQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-type:date:date:feedback-id
:feedback-id:from:from:in-reply-to:in-reply-to:message-id
:mime-version:references:reply-to:reply-to:sender:subject
:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
:x-sasl-enc; s=fm3; t=1675636014; x=1675722414; bh=Q/FJRL9x04pXZ
qiZC3nT+Ed+E+PSA9eFStmm+tduSm0=; b=OnOL6SgY7jqfblH5OrrMzd49EIN8J
14NKhwEZ3gPn4E3EQxDhATsl8vMnfq+80PuzWnb7cKSlSgAKNeWF4RehSEGPFUQ4
xYPNMkBuUTc95CC85auUKgme3+uWoehhCxrlQFo9qGsEPX9qGaLGhbDq93eUBXHe
CK1qL2j4yKjTq6jgBjvt9boFhiaZp4XcDxD2fKBeBL65vZi0XR+zaFpQ5GxY1hTn
pBXwEcg1gq9p9WjHCXlZ6ADM/d95IQH57HBQ5kyyJWRVySvg+ztDnffOLCxUfTSX
nf1cHVurWDHPsdr6n1QFGKsyLNKsSEVZYwIM6e2dmZnxAsfUV3yI1LOLA==
X-ME-Sender: <xms:LS3gY7OALN9A6lijhjH7QbRpYwlRaYLCG7shMmbrQ7-5iW5iwsZXHQ>
<xme:LS3gY1-6jSinlR717CKzIHCTH7MemwDlEpDF8egKOn2mT_e5xCUCd-9z6XNL4HRxq
o02k0cV9wDFK-qTqw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggedgudeiudcutefuodetggdotefrod
ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
enucfjughrpefofgggkfgjfhffhfhrvfevufgtsegrtderreerreejnecuhfhrohhmpefl
ohhsthgvihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjh
honhhighhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeevheeludehlefgtdetleet
veelvedvteeulefhgfelvdetfeegleekveelgeekueenucevlhhushhtvghrufhiiigvpe
dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhsthgvihhnsehsvggtuhhrvgdrkhhj
ohhnihhgshgvnhdrnhgvth
X-ME-Proxy: <xmx:LS3gY6QMvsK7UxdMIw6EKBO92W0RxJOCXNaWNyUY_6BYzVSyJsrgUA>
<xmx:LS3gY_slWs6XUw5_NUvGPZT7OdQzbPuvEN-8v75fqj9uSjbDLJzTVA>
<xmx:LS3gYzdyKcRrhT7UD_w3AUzAR6DnjsOS8r1rfXXVT_Ipbk4NSRsEyg>
<xmx:Li3gY7HV0xTOXJ6KwvKnMGRkp2OMxMaq9QH9lKmCPV8hrS-QttqRVA>
Feedback-ID: ib2f84088:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501)
id BC4AB1700090; Sun, 5 Feb 2023 17:26:53 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.9.0-alpha0-107-g82c3c54364-fm-20230131.002-g82c3c543
Mime-Version: 1.0
Message-Id: <da5f9859-696d-4974-9435-b93996859d15@HIDDEN>
In-Reply-To: <871qn37nxh.fsf@HIDDEN>
References: <dc5b36b3-31a7-1c87-3be1-88ad2b3b6dd5@HIDDEN>
<871qn37nxh.fsf@HIDDEN>
Date: Sun, 05 Feb 2023 23:26:32 +0100
From: =?UTF-8?Q?Jostein_Kj=C3=B8nigsen?= <jostein@HIDDEN>
To: "Theodor Thornhill" <theo@HIDDEN>
Subject: Re: bug#61303: 29.0.60;
rust-ts-mode does not consistently fontify nested macro-invocations
Content-Type: multipart/alternative; boundary=a3f919d0a4d04d63862e146b043d2c52
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61303
Cc: Randy Taylor <dev@HIDDEN>,
=?UTF-8?Q?Jostein_Kj=C3=B8nigsen?= <jostein@HIDDEN>,
61303 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: jostein@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
--a3f919d0a4d04d63862e146b043d2c52
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable
On Sun, Feb 5, 2023, at 23:22, Theodor Thornhill wrote:
> Jostein Kj=C3=B8nigsen <jostein@HIDDEN> writes:
>=20
> > Hey there.
> >
>=20
> Hi!
>=20
> > Thanks for another tree-sitter based mode to hack at :D
> >
> > I think I've found an error/lacking in rust-ts-mode where we may hav=
e to move
> > upstream to fix it.
> >
> > Consider the following contrived (and yes, not very idiomatic) rust-=
code:
> >
> > let result =3D format!("{}{}",
> > "Well yes",
> > format!("Or {} no?", "possibly"));
> >
> > With rust-ts-mode first format! invocation will get highlighted as a
> > macro-invocation, while the second will not.
> >
> > Inspecting this using treesit-explore-mode, I get the following tree:
> >
> > (let_declaration let pattern: (identifier) =3D
> > value:
> > (macro_invocation macro: (identifier) !
> > (token_tree (
> > (string_literal " ")
> > (string_literal " ")
> > (identifier)
> > (token_tree (
> > (string_literal " ")
> > (string_literal " ")
> > ))
> > )))
> > ;)
> >
> > Notice the lack of a second/nested "macro_invocation"-node. Instead =
the second
> > macro is just denoted as a "identifier".
> >
> > To fix this, we'll probably need to upstream some bug-reports and PR=
s?
>=20
> Sounds like it! Just in case - the code compiles, right?
>=20
> Theo
>=20
Yes. This is compilable, runnable rust-code.=20
=E2=80=94
Jostein
--a3f919d0a4d04d63862e146b043d2c52
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>=
On Sun, Feb 5, 2023, at 23:22, Theodor Thornhill wrote:<br></div><blockq=
uote type=3D"cite" id=3D"qt" style=3D""><div>Jostein Kj=C3=B8nigsen <=
<a href=3D"mailto:jostein@HIDDEN">jostein@HIDDEN=
.net</a>> writes:<br></div><div><br></div><div>> Hey there.<br></d=
iv><div>><br></div><div><br></div><div>Hi!<br></div><div><br></div><d=
iv>> Thanks for another tree-sitter based mode to hack at :D<br></div=
><div>><br></div><div>> I think I've found an error/lacking in rus=
t-ts-mode where we may have to move<br></div><div>> upstream to fix i=
t.<br></div><div>><br></div><div>> Consider the following contrive=
d (and yes, not very idiomatic) rust-code:<br></div><div>><br></div><=
div>> let result =3D format!("{}{}",<br></div><div>> &=
nbsp; "Well yes",<br></div><div>> format!("Or {} n=
o?", "possibly"));<br></div><div>><br></div><div>> With rust-ts-mo=
de first format! invocation will get highlighted as a<br></div><div>>=
macro-invocation, while the second will not.<br></div><div>><br></di=
v><div>> Inspecting this using treesit-explore-mode, I get the follow=
ing tree:<br></div><div>><br></div><div>> (let_declaration let pat=
tern: (identifier) =3D<br></div><div>> value:<br></div><div>&g=
t; (macro_invocation macro: (identifier) !<br></div><div>&g=
t; (token_tree (<br></div><div>>  =
; (string_literal " ")<br></div><div>> =
(string_literal " ")<br></div><div>> (ident=
ifier)<br></div><div>> (token_tree (<br></di=
v><div>> (string_literal " ")<br></div=
><div>> (string_literal " ")<br></div>=
<div>> ))<br></div><div>> &nb=
sp; )))<br></div><div>> ;)<br></div><div>><br><=
/div><div>> Notice the lack of a second/nested "macro_invocation"-nod=
e. Instead the second<br></div><div>> macro is just denoted as a "ide=
ntifier".<br></div><div>><br></div><div>> To fix this, we'll proba=
bly need to upstream some bug-reports and PRs?<br></div><div><br></div><=
div>Sounds like it! Just in case - the code compiles, right?<br></=
div><div><br></div><div>Theo<br></div><div><br></div></blockquote><div><=
br></div><div>Yes. This is compilable, runnable rust-code. <br></di=
v><div><br></div><div>=E2=80=94<br></div><div>Jostein</div></body></html=
>
--a3f919d0a4d04d63862e146b043d2c52--
bug-gnu-emacs@HIDDEN:bug#61303; Package emacs.
Full text available.
Received: (at 61303) by debbugs.gnu.org; 5 Feb 2023 22:22:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 05 17:22:23 2023
Received: from localhost ([127.0.0.1]:46645 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1pOnOw-0001sC-Kb
for submit <at> debbugs.gnu.org; Sun, 05 Feb 2023 17:22:22 -0500
Received: from out-250.mta0.migadu.com ([91.218.175.250]:29681)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <theo@HIDDEN>) id 1pOnOv-0001s2-28
for 61303 <at> debbugs.gnu.org; Sun, 05 Feb 2023 17:22:21 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
s=key1; t=1675635739;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=n1YXUWZdTxhwnrFBlwD4S6dOMpuCRV1PLSf5rLlQIYU=;
b=cvOD1dDNjGoqJGPtlsGnjeHWqap712+qM5S2/4qF9Ra6WQU0AQ6SQVUmaW2KGsqsKpQldL
9gDjP0WQdQKfrCMR0QqEL9olcc4ugUaysWDN6SXhvGmbdWiNXBoaX+IdN1L/U8iw4SdAJr
d+db7vgdwoMaJ2+jzhA0fUfdyldRyiksF1EDCqWejNHFLRLkO+cL9AX5f/pDcPjpVJKrVG
chEPcYTPxE0XiALBPlNLSdbssN4pY5irKOcm49ghv+I2yKd0DkUUfnSaeOBAwhq0xeAHyS
IwHNkMgL0OIRxbKJN/Kd0PAHHyVxqVPtx1PHzKxR9hXTrzsM/iXAbUpRPXkCQA==
From: Theodor Thornhill <theo@HIDDEN>
To: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= <jostein@HIDDEN>
Subject: Re: bug#61303: 29.0.60; rust-ts-mode does not consistently fontify
nested macro-invocations
In-Reply-To: <dc5b36b3-31a7-1c87-3be1-88ad2b3b6dd5@HIDDEN>
("Jostein =?utf-8?Q?Kj=C3=B8nigsen=22's?= message of "Sun, 5 Feb 2023
22:08:32 +0100")
References: <dc5b36b3-31a7-1c87-3be1-88ad2b3b6dd5@HIDDEN>
Date: Sun, 05 Feb 2023 23:22:18 +0100
Message-ID: <871qn37nxh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61303
Cc: dev@HIDDEN, jostein@HIDDEN, 61303 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Jostein Kj=C3=B8nigsen <jostein@HIDDEN> writes:
> Hey there.
>
Hi!
> Thanks for another tree-sitter based mode to hack at :D
>
> I think I've found an error/lacking in rust-ts-mode where we may have to =
move
> upstream to fix it.
>
> Consider the following contrived (and yes, not very idiomatic) rust-code:
>
> let result =3D format!("{}{}",
> =C2=A0=C2=A0=C2=A0 "Well yes",
> =C2=A0=C2=A0=C2=A0 format!("Or {} no?", "possibly"));
>
> With rust-ts-mode first format! invocation will get highlighted as a
> macro-invocation, while the second will not.
>
> Inspecting this using treesit-explore-mode, I get the following tree:
>
> (let_declaration let pattern: (identifier) =3D
> =C2=A0 value:
> =C2=A0=C2=A0 (macro_invocation macro: (identifier) !
> =C2=A0=C2=A0=C2=A0 (token_tree (
> =C2=A0=C2=A0=C2=A0=C2=A0 (string_literal " ")
> =C2=A0=C2=A0=C2=A0=C2=A0 (string_literal " ")
> =C2=A0=C2=A0=C2=A0=C2=A0 (identifier)
> =C2=A0=C2=A0=C2=A0=C2=A0 (token_tree (
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string_literal " ")
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string_literal " ")
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ))
> =C2=A0=C2=A0=C2=A0=C2=A0 )))
> =C2=A0 ;)
>
> Notice the lack of a second/nested "macro_invocation"-node. Instead the s=
econd
> macro is just denoted as a "identifier".
>
> To fix this, we'll probably need to upstream some bug-reports and PRs?
Sounds like it! Just in case - the code compiles, right?
Theo
bug-gnu-emacs@HIDDEN:bug#61303; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 5 Feb 2023 21:15:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 05 16:15:58 2023
Received: from localhost ([127.0.0.1]:46583 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1pOmMf-0000A1-Le
for submit <at> debbugs.gnu.org; Sun, 05 Feb 2023 16:15:58 -0500
Received: from lists.gnu.org ([209.51.188.17]:49752)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <jostein@HIDDEN>) id 1pOmMd-00009t-CC
for submit <at> debbugs.gnu.org; Sun, 05 Feb 2023 16:15:56 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <jostein@HIDDEN>)
id 1pOmMb-0001TY-G8
for bug-gnu-emacs@HIDDEN; Sun, 05 Feb 2023 16:15:53 -0500
Received: from wout5-smtp.messagingengine.com ([64.147.123.21])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <jostein@HIDDEN>)
id 1pOmMZ-0001xq-0C
for bug-gnu-emacs@HIDDEN; Sun, 05 Feb 2023 16:15:53 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
by mailout.west.internal (Postfix) with ESMTP id 4744C32001AB;
Sun, 5 Feb 2023 16:08:35 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
by compute3.internal (MEProxy); Sun, 05 Feb 2023 16:08:35 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
secure.kjonigsen.net; h=cc:content-transfer-encoding
:content-type:date:date:from:from:in-reply-to:message-id
:mime-version:reply-to:reply-to:sender:subject:subject:to:to; s=
fm2; t=1675631314; x=1675717714; bh=ivfJ/QacnkUTGFlrxES+WCGHzSKu
ifuPuxvSn0ynnDs=; b=MtwPCVypHM6qdrCtKF2lKyTwFQy6atz2nS0x3UtazUZb
ieWZcabIflcYWVLCZR8+DXjvi5lf64FZIOI0fagSO/LbCEAATi0TKzSjkfPK3WUN
qlrFUBtowJW/NtjWnFIfe+RLl46e45zBtN9WyBR4nIUf6kznpyMW774QQCAPmhWU
mnCfbQHd7lqxmlelQIJdz+gK84OxyxbTvXx/Ks73bmKG+CDU35WlpYLIaCyF9tHO
fR2vXnt+QspC5UjVCIsZ7x/SmR3FAHrjbPeTLncOIrJH0ZEhb0Vr3h0baFiXU+s2
5OxTXkRDYOaBomjBqWm6vaXBuYeJv5TUIhiCqLDPFg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:content-transfer-encoding:content-type
:date:date:feedback-id:feedback-id:from:from:in-reply-to
:message-id:mime-version:reply-to:reply-to:sender:subject
:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
:x-sasl-enc; s=fm3; t=1675631314; x=1675717714; bh=ivfJ/QacnkUTG
FlrxES+WCGHzSKuifuPuxvSn0ynnDs=; b=RY3cxTGHVSQd4dyvgroW6WngFIvQM
l+KJ79xVfKgKgiY/5boLzVcKXlRJ1TbPbnY9IZHaDEk0Ir/4Bfs+IiiGrYXW17sR
NHhWWf2GosqAUfeesSLw5IYhQSvPPDCzhrj5qUWBxASsmPEy7i4xGjnnhmWUNKVw
sk7Z+Z13XbmgsgrzliPL+oBDHummqRkgexWE1KB/8seotdws53/1Tass0V3xHfMY
vblmZx9leV9vZIBtJVhnYQT9fyrMscTDCuEzU8CsI6k17tE5rP4WGG1K6CrymwcB
MRqVMwN098HdYJj1O/ijEqXBJMvxO87MVzGDzXTluj7cRAKdDZNPJxTOg==
X-ME-Sender: <xms:0hrgY-ipf8oMP2L4VHBX0h_3thyH_WMrT96isRWMnWHaO1oNSVDMbw>
<xme:0hrgY_Dj1wS3ZAj5mbzxNZ7xGjTyCM8cu2DjnDFMpSgeNi9qXUoxS6awotGF96-B7
e5mfImzbRFYGrkpjg>
X-ME-Received: <xmr:0hrgY2EFVj_KQJ-sBCfx1jf6aokX09LUAwfEMgs3IqHOXYbKN3zn7L_f9ROWlBN58GA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggedgudeghecutefuodetggdotefrod
ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfrhfvhffutgfgsehtke
ertddtfeejnecuhfhrohhmpeflohhsthgvihhnucfmjhppnhhighhsvghnuceojhhoshht
vghinhesshgvtghurhgvrdhkjhhonhhighhsvghnrdhnvghtqeenucggtffrrghtthgvrh
hnpeekleehueetieefleefgfevuddvffejheeigedvfeeuueejfeehhfegveejveevteen
ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhsth
gvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvth
X-ME-Proxy: <xmx:0hrgY3TcxJhyR57oyNAq_psKtqUNcM8VohA5nG-bcIImhAYwjietzw>
<xmx:0hrgY7zZFfnixWpGVk1gCWXkIbbyi7O920KFoXznexWZJiJIFupaKw>
<xmx:0hrgY145I_JCZT6DC_V1XYa2Rl1sNMPnhBp5GKoZXECWLAWLe8HyOQ>
<xmx:0hrgY5YNwMUg5e4gBtdto7VDMBiSm1u48b9p1thNWAY0joXiv-tuMw>
Feedback-ID: ib2f84088:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
5 Feb 2023 16:08:34 -0500 (EST)
Message-ID: <dc5b36b3-31a7-1c87-3be1-88ad2b3b6dd5@HIDDEN>
Date: Sun, 5 Feb 2023 22:08:32 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Content-Language: en-GB, nb-NO
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>, Randy Taylor <dev@HIDDEN>
From: =?UTF-8?Q?Jostein_Kj=c3=b8nigsen?= <jostein@HIDDEN>
Subject: 29.0.60; rust-ts-mode does not consistently fontify nested
macro-invocations
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=64.147.123.21;
envelope-from=jostein@HIDDEN;
helo=wout5-smtp.messagingengine.com
X-Spam_score_int: -26
X-Spam_score: -2.7
X-Spam_bar: --
X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7,
SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: jostein@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)
Hey there.
Thanks for another tree-sitter based mode to hack at :D
I think I've found an error/lacking in rust-ts-mode where we may have to
move upstream to fix it.
Consider the following contrived (and yes, not very idiomatic) rust-code:
let result = format!("{}{}",
"Well yes",
format!("Or {} no?", "possibly"));
With rust-ts-mode first format! invocation will get highlighted as a
macro-invocation, while the second will not.
Inspecting this using treesit-explore-mode, I get the following tree:
(let_declaration let pattern: (identifier) =
value:
(macro_invocation macro: (identifier) !
(token_tree (
(string_literal " ")
(string_literal " ")
(identifier)
(token_tree (
(string_literal " ")
(string_literal " ")
))
)))
;)
Notice the lack of a second/nested "macro_invocation"-node. Instead the
second macro is just denoted as a "identifier".
To fix this, we'll probably need to upstream some bug-reports and PRs?
--
Jostein
In GNU Emacs 29.0.60 (build 7, x86_64-pc-linux-gnu, GTK+ Version
3.24.36, cairo version 1.17.6) of 2023-02-05 built on thinkpad-t14s
Repository revision: 088425538f2122d88a4f4e132dbb2f1139648531
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Arch Linux
Configured using:
'configure --with-json --with-tree-sitter'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Rust
Minor modes in effect:
treesit-explore-mode: t
electric-pair-mode: t
highlight-symbol-mode: t
flycheck-mode: t
editorconfig-mode: t
company-mode: t
which-function-mode: t
helm-mode: t
helm-minibuffer-history-mode: t
shell-dirtrack-mode: t
helm--remap-mouse-mode: t
async-bytecomp-package-mode: t
delete-selection-mode: t
global-auto-revert-mode: t
yas-global-mode: t
yas-minor-mode: t
global-nlinum-mode: t
nlinum-mode: t
ido-yes-or-no-mode: t
override-global-mode: t
server-mode: t
global-hl-line-mode: t
pixel-scroll-precision-mode: t
doom-modeline-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
hs-minor-mode: t
Load-path shadows:
/home/jostein/.emacs.d/elpa/transient-20230107.1528/transient hides
/home/jostein/build/emacs/lisp/transient
Features:
(shadow sort mail-extr emacsbug message yank-media rfc822 mml mml-sec
epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums bug-reference face-remap cus-start rust-ts-mode
c-ts-common treesit helm-command helm-elisp helm-eval edebug helm-info
vc-hg vc-git diff-mode vc-bzr vc-dispatcher disp-table cargo
cargo-process markdown-mode color elec-pair rust-utils rust-mode
rust-rustfmt rust-playpen rust-compile rust-cargo vc-svn dired-aux
flyspell ispell help-fns radix-tree cl-print tramp-sh image-file
image-converter winner helm-external helm-net tramp-archive tramp-gvfs
tramp-cache time-stamp zeroconf dbus ffap add-log ido-completing-read+
memoize minibuf-eldef elisp-slime-nav paredit highlight-symbol flycheck
editorconfig editorconfig-core editorconfig-core-handle
editorconfig-fnmatch company-oddmuse company-keywords company-etags
etags fileloop generator company-gtags company-dabbrev-code
company-dabbrev company-files company-clang company-capf company-cmake
company-semantic company-template company-bbdb company eglot
external-completion array jsonrpc ert ewoc debug backtrace flymake-proc
flymake warnings which-func hideshow eww url-queue thingatpt shr
pixel-fill kinsoku url-file svg xml dom puny mm-url gnus nnheader
gnus-util mail-utils range mm-util mail-prsvr helm-imenu helm-mode
helm-misc helm-files image-dired image-dired-tags image-dired-external
image-dired-util xdg image-mode dired dired-loaddefs exif tramp
tramp-loaddefs trampver tramp-integration cus-edit pp cus-load wid-edit
files-x tramp-compat shell parse-time iso8601 ls-lisp helm-buffers
helm-occur helm-tags helm-locate helm-grep helm-regexp helm-utils
helm-help helm-types helm helm-global-bindings helm-easymenu helm-core
async-bytecomp helm-source helm-multi-match helm-lib async pcase imenu
ob-plantuml org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src ob-comint org-pcomplete pcomplete org-list org-footnote
org-faces org-entities time-date noutline outline icons ob-emacs-lisp
ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys
oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version
org-compat org-macs format-spec delsel autorevert filenotify yasnippet
nlinum linum ido-yes-or-no advice ido edmacro kmacro
use-package-bind-key bind-key easy-mmode xref project server hl-line
pixel-scroll cua-base compile-eslint compile text-property-search comint
ansi-osc ansi-color ring doom-modeline doom-modeline-segments
doom-modeline-env doom-modeline-core all-the-icons all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons shrink-path rx f f-shortdoc s dash compat
dracula-theme cl-extra help-mode use-package-ensure use-package-core
finder-inf yasnippet-autoloads ido-yes-or-no-autoloads
elisp-slime-nav-autoloads cmake-mode-autoloads flycheck-autoloads
pkg-info-autoloads magit-autoloads all-the-icons-autoloads
crontab-mode-autoloads powershell-autoloads doom-modeline-autoloads
undo-tree-autoloads rust-mode-autoloads magit-section-autoloads
paredit-autoloads dracula-theme-autoloads cargo-autoloads
yaml-mode-autoloads helm-autoloads popup-autoloads queue-autoloads
nlinum-autoloads bmx-mode-autoloads company-autoloads
git-commit-autoloads multiple-cursors-autoloads dap-mode-autoloads
lsp-treemacs-autoloads treemacs-autoloads cfrs-autoloads
posframe-autoloads hydra-autoloads pfuture-autoloads
ace-window-autoloads avy-autoloads bui-autoloads transient-autoloads
ido-completing-read+-autoloads memoize-autoloads with-editor-autoloads
compat-autoloads epl-autoloads lsp-docker-autoloads yaml-autoloads
highlight-symbol-autoloads expand-region-autoloads lsp-mode-autoloads
lv-autoloads markdown-mode-autoloads spinner-autoloads ht-autoloads
shrink-path-autoloads f-autoloads dash-autoloads s-autoloads info
editorconfig-autoloads helm-core-autoloads async-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache
json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process emacs)
Memory information:
((conses 16 595433 43945)
(symbols 48 41127 1)
(strings 32 186487 7325)
(string-bytes 1 5326600)
(vectors 16 70866)
(vector-slots 8 906939 66598)
(floats 8 868 339)
(intervals 56 7370 541)
(buffers 984 35))
jostein@HIDDEN:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#61303; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.