From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#59637: 29.0.50; Should treesit-range-settings support the possibility of separate parser for each region? Date: Sun, 27 Nov 2022 09:28:56 -0800 Message-ID: References: <87v8n0b9th.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40379"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu To: miha@kamnitnik.top, 59637@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 27 18:30:20 2022 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 1ozLTw-000ALP-6T for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Nov 2022 18:30:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozLTg-00030s-Bu; Sun, 27 Nov 2022 12:30:04 -0500 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 1ozLTf-00030P-0A for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2022 12:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozLTe-0001rU-KI for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2022 12:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozLTe-000700-FF for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2022 12:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Nov 2022 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59637 X-GNU-PR-Package: emacs Original-Received: via spool by 59637-submit@debbugs.gnu.org id=B59637.166957014526857 (code B ref 59637); Sun, 27 Nov 2022 17:30:02 +0000 Original-Received: (at 59637) by debbugs.gnu.org; 27 Nov 2022 17:29:05 +0000 Original-Received: from localhost ([127.0.0.1]:43241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozLSj-0006z7-8z for submit@debbugs.gnu.org; Sun, 27 Nov 2022 12:29:05 -0500 Original-Received: from mail-oa1-f47.google.com ([209.85.160.47]:44591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozLSg-0006yj-TO for 59637@debbugs.gnu.org; Sun, 27 Nov 2022 12:29:03 -0500 Original-Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-142306beb9aso10577169fac.11 for <59637@debbugs.gnu.org>; Sun, 27 Nov 2022 09:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=US6lueThxeIx2ciew3tGEA3W/xOVDMbbuyI79fqm4ac=; b=ehV6lPSMaL5/RZmJjU8X3qPbF4XDWJ+UcIA8mUrnA0O7oT7Ovr677fcwrqEbANlPWJ 1nqmK3LujQ4tlhb8qeiy45ifvGoVj1KQcua4DMofVmPTeOIkK8rEfgXOLAWZcbOZk461 I70z4AE7qf9D+gF9chUjGtw7dOeqoGC2qlfL7oaTziDNnARM+vn8ZLVtv1axHC8gpJ+j FZzEdjdFAvhIQKa+iAM1CsfjWl/3rBH/GCD/XcSbE38dN7elcfx/E0iYrSnxDeVukZfi ujTHQLVRosuXn1L2BnMWCk4/vHIlXC0RpTqPWZqfZDVpiNml2UMVhxpNcNuckqmFJELN a5BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=US6lueThxeIx2ciew3tGEA3W/xOVDMbbuyI79fqm4ac=; b=t1Nsjj9zAUTCSSaEnU35Dd/d83DxWIARJawRpycU1vHoXAevqohVje6K9wM4XWrgoo GaPxO7ntsF3yA4kFZ69ArKaREUCIQGEV7z0vw21D0bIumN7QVZFRg1heNjfib2bqX/xl LVagvE4i1TLGHYmE8VGP0niCmuuXqNlT+DEtCOwUbw67PIDR+kxG5C+JpHizLKrPlF9T V9S3ouGXn9MzKzRitv5YRrKgckNXNVvPG4/cCkKeKPJpvxis/jRpxeC4KY37BgVkHIgF tAlMpf34efEIzlUTNHuySzsiQ6u1vcqlNhM9XrMvZ1EE9D/23ldTf7G8sOSm+/4GXVoP 0Rqw== X-Gm-Message-State: ANoB5pkrbTjhykUmIpHKEQkrdgXbt6rpj3QUrXamIU9y5rjNceF5rtKN xzh8SD67tdcXZzvYHlGydpGQqXS+bsHrITcfIcY= X-Google-Smtp-Source: AA0mqf4fiyJJowDSkRaC+kmHeeOSfhBRFZeq45oCN2OWATVaGm7pZgnL6SzpwEc2KWahnE89vFJMwEMSniefvXcRZD0= X-Received: by 2002:a05:6870:cc89:b0:12b:fbe7:b793 with SMTP id ot9-20020a056870cc8900b0012bfbe7b793mr28213586oab.92.1669570137259; Sun, 27 Nov 2022 09:28:57 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 27 Nov 2022 09:28:56 -0800 In-Reply-To: <87v8n0b9th.fsf@miha-pc> X-Hashcash: 1:20:221127:casouri@gmail.com::ZDFc5g47YcubD8SU:w0b 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:249238 Archived-At: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > As far as I understand, the current behaviour of > treesit-parser-set-included-ranges is that the concatenation of text > from different regions in the same range set is considered as one > program. This means that for this html program > > > > > > > treesitter would consider "alert('hello');" to be inside a comment and > the second script tag would contain an error about missing comment > end. > > However, testing this in Firefox, it seems that the first script tag is > the erroneous one here and the alert function call isn't inside a > comment. So I guess the correct way to parse this html document would be > to have two instances of javascript parser, one for each region. On the > other hand, we should consider if this is worth the added complexity and > performance degradation. > > Thanks and best regards. Copying in Yuan Fu.