From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61043: 30.0.50; `json-ts-mode': invalid font lock rule Date: Wed, 25 Jan 2023 13:08:31 +0100 Message-ID: <87o7qm95q8.fsf@thornhill.no> References: <87lelrwv7f.fsf@masteringemacs.org> <87cz73vzpi.fsf@masteringemacs.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19518"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61043@debbugs.gnu.org, Dmitry Gutov To: Mickey Petersen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 25 13:09:38 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 1pKeav-0004r9-7x for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Jan 2023 13:09:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKeak-0000sh-In; Wed, 25 Jan 2023 07:09:27 -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 1pKeaN-0000oo-NB for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 07:09:10 -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 1pKeaM-0006lS-N5 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 07:09:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKeaM-0000ui-99 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 07:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2023 12:09:02 +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.16746485153475 (code B ref 61043); Wed, 25 Jan 2023 12:09:02 +0000 Original-Received: (at 61043) by debbugs.gnu.org; 25 Jan 2023 12:08:35 +0000 Original-Received: from localhost ([127.0.0.1]:58516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeZu-0000ty-Fj for submit@debbugs.gnu.org; Wed, 25 Jan 2023 07:08:34 -0500 Original-Received: from out-134.mta0.migadu.com ([91.218.175.134]:16166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeZt-0000to-4d for 61043@debbugs.gnu.org; Wed, 25 Jan 2023 07:08:33 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1674648511; 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: in-reply-to:in-reply-to:references:references; bh=jTkAISXm/PrT0jeI8ILyt6OWh/c63Bq8Xh5YURino4E=; b=oJtFmjM89Zh8DwByM5GSwBj7kC1Uiric6Sc+CZOvcpji18AO7guJ7Im/mFxV5FjVaIhabF BnjyICxet/1p9XZvTai+QSLtL8GMlX4f40jzNZeGzm2LsY1imYwahzX5HRQjnudVG7ooCv H0zDhPgdUXTURDDsHDFco6mQS3Q56UShLPKdFrv7FelspDUhM9JOY752uo9Uk0J2F/MI7y lC5bKBOMrdJNcViKwEcHNHhshp2Y5pP/b7O3a5rEpvaUQePChOzgKHvxOBNAJpvkNLRQSZ S0/KPcmdcg/d1GYTpvTLw5+bUt4xE/yNdswqbUXa49w10P19qwI6JgWzzVeUCg== In-Reply-To: <87cz73vzpi.fsf@masteringemacs.org> (Mickey Petersen's message of "Wed, 25 Jan 2023 07:29:23 +0000") X-Migadu-Flow: FLOW_OUT 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:254113 Archived-At: Mickey Petersen writes: > Dmitry Gutov writes: > >> 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. > > It may well be my JSON grammar file that is different then. Which is > perhaps even worse: it is easy to find yourself with one of two > versions. See [0], it seems comment is supported if I'm not mistaken. Theo [0]: https://github.com/tree-sitter/tree-sitter-json/blob/master/grammar.js#L6