From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.bugs Subject: bug#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c? Date: Tue, 17 Sep 2024 22:35:21 +0200 Message-ID: <5124401.vuYhMxLoTh@fedora> References: <24215349.4csPzL39Zc@fedora> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart7309357.OV4Wx5bFTl" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40698"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Vincenzo Pupillo To: 73324@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 17 22:36:06 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqeve-000AQt-25 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Sep 2024 22:36:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqevM-0000SO-H5; Tue, 17 Sep 2024 16:35:48 -0400 Original-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 ) id 1sqevL-0000SC-Dg for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 16:35:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqevL-0004wI-5J for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 16:35:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=FRdmEq2k7fHEjjSStMRCHzoFdg7bE0f5R2tV5ard728=; b=blzwwc0KjxvwkIOyPuuVfXVtiMR8G+Wi08+SXaYC16w3DMwN2OTmrPGkdxszi5jSNgniRN5B4xmbgoO/qy9CJyXwo/Z/8wotx/8q6IdmFRGras9s9ds+DH7v2xCGRYrMQljf8SNtWovNC2/1w32VdSYyYr9o0dBELjP6Q6cZ+wkfrgLZuI05Zsg/xU9zqglIWUY1PW69JhIEH1Z4HnzES0k60tuTOq0qztBjuCkvDrNEEWbEzcP5B4LfD6vlDYm3KrYnGAMwp1LPW0GsuRoOHtZDAo78wrgc813qsUB7NILvTiHjCQpRsaT3uOAp2TVStg6JS9xQZcV267ngxo0JiQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqeva-0003pJ-5F for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 16:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2024 20:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73324 X-GNU-PR-Package: emacs X-Debbugs-Original-To: 73324@debbugs.gnu.org, bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172660534714684 (code B ref -1); Tue, 17 Sep 2024 20:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Sep 2024 20:35:47 +0000 Original-Received: from localhost ([127.0.0.1]:56124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqevL-0003om-EZ for submit@debbugs.gnu.org; Tue, 17 Sep 2024 16:35:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqevK-0003od-61 for submit@debbugs.gnu.org; Tue, 17 Sep 2024 16:35:46 -0400 Original-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 ) id 1sqev0-0000Qz-MH for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 16:35:28 -0400 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqeuy-0004vF-Ly for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 16:35:26 -0400 Original-Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5c25554ec1eso1082796a12.1 for ; Tue, 17 Sep 2024 13:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726605323; x=1727210123; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FRdmEq2k7fHEjjSStMRCHzoFdg7bE0f5R2tV5ard728=; b=ZRdEu/32DaIqqXwNt2lSVsM02tSdXcKJvyDDUscEv/lS5HJXZmhYyH5Eg5FhyozjVR 7SvL/18JtN96jnMqJBKxFV94kTfS0RylUVwYXSK/tUXsHd4ilNbgy6ScupYykh+JPJRq hxRYtqtmOcALJLOPoc3tYR2rtPYVeZvUFWgyenpGdTDdZj0+Oa0OEd5O0O6Qmn1MRyZl mDjyZmnP6CD1pYH+wTsCGiD81enzdUckYWB0lZqLHGw+HSP15LvLwM6DpHu1a1cEoyy+ urakIamt0MRwP0pwRFn0lc33a43coj8xZRFFQJg5y55/b04TIpiL4DJamLFvEyWQiw5z nLQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726605323; x=1727210123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FRdmEq2k7fHEjjSStMRCHzoFdg7bE0f5R2tV5ard728=; b=H5D07XW5hJpACH3/qO9QGbNHRnIUZSGe2BOM31iLXJE1cma8elho/1vJphrA4E0Lrr JnOtq3nZ/awsENrzKMYrrYn52WJXAqDPEB8gwyw0G9KcAw3IVej3IaphWoQuu74R1nzV a8+HpVrKNjtImQzEdAdyT4qtkMv3KozhyqEzFw789zyZY7cqgxN0AljkmCYZLHZcyOhq 4bc6KBui7vFTolP5zY1pEgMBTYSs/BiEdm1ZJ6Eoo3ebJFpYCN7WEbdNz1WK7bIMrcmg xAWiOWG2DCW24AzZUOe/+XHil1zwxomDLUnj7ARQGFpasZEeG/u+AJd1hTW7K4u/XaxD p7tQ== X-Forwarded-Encrypted: i=1; AJvYcCXWTd/sjp4QMI9IKfVIwsKJ2PulQ1uk5Iadu1qTveKZqYsCKoBb7lu+oXLhK3kcQnqD6/Hpz/S0RCa9XpQN@gnu.org X-Gm-Message-State: AOJu0YwSUBj85h0TnfCNIEUgao4gvjNqsjIz/Bt92o7AmSOqvkA3HpRJ vZJ50uG97eq4hfZfZFhNOun7QsQ7SJJyQaNaGppY/eaU7f7JMO66 X-Google-Smtp-Source: AGHT+IFFonEjI8OmAQZHDynAsWDHBdiOBiK71QhIVWpp5pEy6IyQhimmMfJejRakhnhhM8UMl1RKcw== X-Received: by 2002:a05:6402:510f:b0:5c2:6083:6256 with SMTP id 4fb4d7f45d1cf-5c413e12255mr18007009a12.10.1726605322509; Tue, 17 Sep 2024 13:35:22 -0700 (PDT) Original-Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c42bb56b8bsm4076155a12.38.2024.09.17.13.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2024 13:35:22 -0700 (PDT) In-Reply-To: <24215349.4csPzL39Zc@fedora> Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=v.pupillo@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291974 Archived-At: This is a multi-part message in MIME format. --nextPart7309357.OV4Wx5bFTl Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Sorry, I forgot to attach the php file. In data marted=C3=AC 17 settembre 2024 22:29:14 CEST, Vincenzo Pupillo ha s= critto: > Ciao, > php-ts-mode no longer behaves as it used to. There seems to be some probl= ems > with the calculation of ranges covered by the parsers. In the image I > attached you can see how the code is being parsed by both the php and > javascript parsers. The namespace declaration has some elements colored as > if they were escape sequences. > The php-ts-mode--get-parser-ranges function returns the following ranges: >=20 > ((# nil) (# nil) > (# nil) (# nil) > (# ((368 . 426))) (# > ((368 . 426)))) >=20 > The range for 'jsdoc' is wrong, there should be only the range for 'phpdo= c'. > The attached gif screencast shows the strange behavior in updating the > font- lock. > It doesn't happen all the time. I'm trying to isolate the problem. >=20 > Any ideas about this? > The parsers were installed with php-ts-mode-install-parser. >=20 > GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, ca= iro > version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64 >=20 >=20 > Thanks. >=20 > Vincenzo --nextPart7309357.OV4Wx5bFTl Content-Disposition: attachment; filename="namespace.php" Content-Transfer-Encoding: base64 Content-Type: application/x-php; name="namespace.php" PD9waHAKCm5hbWVzcGFjZSBNeVByb2plY3RcU3ViXExldmVsOwoKIyBuYW1lc3BhY2UgTXlQcm9q ZWN0OwoKY29uc3QgQ09OTkVDVF9PSyA9IDE7CmNsYXNzIENvbm5lY3Rpb24geyAvKiAuLi4gKi8g fQpmdW5jdGlvbiBjb25uZWN0KCkgeyAvKiAuLi4gKi8gfQoKbmFtZXNwYWNlIE15UHJvamVjdCB7 CiAgICBjb25zdCBDT05ORUNUX09LID0gMTsKICAgIGNsYXNzIENvbm5lY3Rpb24geyAvKiAuLi4g Ki8gfQogICAgZnVuY3Rpb24gY29ubmVjdCgpIHsgLyogLi4uICovICB9Cn0KCm5hbWVzcGFjZSBB bm90aGVyUHJvamVjdCB7CgogICAgY29uc3QgQ09OTkVDVF9PSyA9IDE7CiAgICBjbGFzcyBDb25u ZWN0aW9uIHsgLyogLi4uICovIH0KICAgIC8qKgogICAgICogY29ubmVjdC4uLgogICAgICogQHBh cmFtICBhIHRoZSBwYXJhbSBhCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvbm5lY3QoJGEgPSAnYScp IHsgLyogLi4uICovICB9Cn0KCj8+Cg== --nextPart7309357.OV4Wx5bFTl--