From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61043: 30.0.50; `json-ts-mode': invalid font lock rule Date: Wed, 25 Jan 2023 03:28:00 +0200 Message-ID: References: <87lelrwv7f.fsf@masteringemacs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13046"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: Mickey Petersen , 61043@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 25 02:29:30 2023 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 1pKUbS-0003Db-Kk for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Jan 2023 02:29:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKUb2-0008MX-UG; Tue, 24 Jan 2023 20:29:06 -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 1pKUb0-0008Km-Hy for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 20:29:02 -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 1pKUb0-0005hy-A7 for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 20:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKUaz-0005Dd-Vb for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 20:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2023 01:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61043 X-GNU-PR-Package: emacs Original-Received: via spool by 61043-submit@debbugs.gnu.org id=B61043.167461009120006 (code B ref 61043); Wed, 25 Jan 2023 01:29:01 +0000 Original-Received: (at 61043) by debbugs.gnu.org; 25 Jan 2023 01:28:11 +0000 Original-Received: from localhost ([127.0.0.1]:57908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKUaB-0005Cc-Eo for submit@debbugs.gnu.org; Tue, 24 Jan 2023 20:28:11 -0500 Original-Received: from mail-ej1-f41.google.com ([209.85.218.41]:33520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKUa8-0005CP-Fo for 61043@debbugs.gnu.org; Tue, 24 Jan 2023 20:28:09 -0500 Original-Received: by mail-ej1-f41.google.com with SMTP id tz11so43841573ejc.0 for <61043@debbugs.gnu.org>; Tue, 24 Jan 2023 17:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=CYhSmZ/Ttcr2nNAsDnFFeHjdsak4vWcufe666w3c37Y=; b=km7v2FdBcJlNt9cq+TOFSsPTbwp+uzUOHHFhpr2UNPIHQiv76xP4Y1rBL6yRry4anm lbKGkTSdWQeC6f/aZqiMoa4YDMVzsEQXmAaWVT79RGJLWE9t62AVFZoQmezPG3PEcEAO OC6i2b3MUs0MQzTjGIlWUiQK0ACAwctyUcm15Zfp7qKGxfzNxGyV6VXzQ/bk579Xpd7W pQYDu6F2H/uAIi2inEQrJYgLhrNn1poaNj1UmgwFqlSB7dyw33MMkO+P6kZAtYZtig/W xhQS4DcjHHfCwlBHpXVK5648OMHVnXFGyqcsBigeOTjJmjLmA+VVSiMkt7hcg/PyWH/W RjbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CYhSmZ/Ttcr2nNAsDnFFeHjdsak4vWcufe666w3c37Y=; b=xLGaq1kgQ0RMw1jDLFs+RhJtirsIIUWHrLbrUnsgm9h/XwBfxbBZcqkxTyxc+fWGuf UaevbnEkatCqz/WzVIWWfWrXQZf0YpqqOHDVbRuh8CBZA3AMROiaA4ZXiL397REfkwVk UDNDW+gSUjAQtlLXPVe9LIDUpHhFEgXaLJlKfhbfuHLemvbNL+92V8n1wPZg0JzI3ytq WY3qc5o2di4mr/hkVUOpyon1j0S4goSs3Et4AJhZ2WGqiRN2cxN68XJNcPAwb+jewQpM yBRnNrm+bMNTO8NbnGFx6j0sYYzZYGzHTpn2ErArBzmVXJZet/qfGAcoFf8gXlPC29mc fxng== X-Gm-Message-State: AFqh2kqyb0MkugYlmxYOsOhHWFX5YaRAqOyvXfa1++HqEs9emBJxHgnj KgkYpoxkU5JHfj00J3gCbHAVAJeS+/c= X-Google-Smtp-Source: AMrXdXtKQC3LFEZCp+UxpZPxme5ZGsJIVpkJHxHk/D3/EDbHIj5YWrZfAIiqaDwRPcs45MsYg2+bVQ== X-Received: by 2002:a17:907:961b:b0:872:8e48:3b91 with SMTP id gb27-20020a170907961b00b008728e483b91mr40297879ejc.52.1674610082410; Tue, 24 Jan 2023 17:28:02 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i25-20020a170906265900b007ae10525550sm1613110ejc.47.2023.01.24.17.28.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Jan 2023 17:28:01 -0800 (PST) Content-Language: en-US In-Reply-To: <87lelrwv7f.fsf@masteringemacs.org> 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:254087 Archived-At: On 24/01/2023 22:09, Mickey Petersen wrote: > There's a comment font lock rule in `json-ts-mode'. However, that is > illegal and againt the JSON spec, and indeed the search query fails > because `comment' is not a valid node type. When you say it fails, how does that look to you? Here's an example of a JSON file (or, more accurately, a JSON-superset file) with comments: https://raw.githubusercontent.com/huytd/vscode-espresso-tutti/master/themes/Espresso%20Tutti-color-theme.json The JSON tree-sitter grammar seems to parse them correctly as comments ("comment" node type), and json-ts-mode highlights them as comments correctly as a result.