From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#60376: 29.0.60; Standardize csharp-ts-mode's font-lock features Date: Wed, 28 Dec 2022 00:25:24 -0800 Message-ID: <7A5618C7-25D7-4B52-8D16-5C54F09FA4CA@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27634"; mail-complaints-to="usenet@ciao.gmane.io" To: 60376@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 28 09:26:21 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 1pARlU-0006zm-OW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 09:26:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pARlF-00060y-9c; Wed, 28 Dec 2022 03:26:05 -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 1pARlD-00060n-1g for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 03:26: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 1pARlC-0002UP-Gw for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 03:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pARlC-0008UV-2N for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 03:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Dec 2022 08:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60376 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Bug Report Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.167221593332601 (code B ref -1); Wed, 28 Dec 2022 08:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Dec 2022 08:25:33 +0000 Original-Received: from localhost ([127.0.0.1]:57044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pARkj-0008Tl-9Y for submit@debbugs.gnu.org; Wed, 28 Dec 2022 03:25:33 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:51860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pARkg-0008Tc-Ni for submit@debbugs.gnu.org; Wed, 28 Dec 2022 03:25:31 -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 1pARkg-0005yY-FO for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 03:25:30 -0500 Original-Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pARke-0002GS-Ba for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 03:25:30 -0500 Original-Received: by mail-pl1-x633.google.com with SMTP id jl4so9170747plb.8 for ; Wed, 28 Dec 2022 00:25:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=MnG+A1lvxxmlkLqHibLw7v1DSOt+6PDaiq0ta3RAKvs=; b=fnZJPQ6VMeCNEfGsV+h4Rnl8q6nT3t+kCswdCGYOiqF6yuQjMzSPcvOfzNdqRtaK2Y nFGnkmuv2IWKj0zQZoScHpbU6eSU1iuILHPdiEfjZo55j6OpBxGssPZOEjA5oJQPSVgl d+g83BahiQj5FYSycQQYOsASAqcr3mVE1zU0ZAA3D6dj6ea/42OA/w+M8D71PuTzWRZT md8DZSREMgr5jZwESujQibu939k+oaKqEFMCIGjvxeX6rWlz0bRamIUefhtQAOZRTrUy 3vo4A0PYR+Cnyx8fxaLrNUgEcYRcsCweyLanDUWkqX4zaKIVWa6OjJgcYhbDYtl/5QO7 zYBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MnG+A1lvxxmlkLqHibLw7v1DSOt+6PDaiq0ta3RAKvs=; b=3o/q5SuO0dhN8kIxa58RV7CFcl6XHtTH94WJ4L1dk7/SiUFRKJJMXE7IIn7ySt9obC hEM6Qf7JV7FCwyKRvXW19YPxeQOfXyYTq59jS9tcFRFh3HxghLeJ++0274ZP2CGYTbu8 Oi2D6Qq57RCP16dgKzF9mK+eJiuMNITwBNR2w4twoiK7LsncTFt5G93gJ4Oi7QESkVTf yWAnxh/WsnDtBQo+lf1N6+ttcm/1dOMKbGyNHUp6SBUewW7XkgIntQ+CjxHvtd0iLwlX GPV7/hAOCAVzyoe56BC4RhyoZGB8FT+9HthfcnbPmIqbacD6H6Pc//9BuMDpBkLjjc5R LuHg== X-Gm-Message-State: AFqh2kpadu2G6RoXHhJdzTTPnY7NlUmp6LvFpy3h2muhurZyda+OsSBA YBGLpw3uY7oD9bYZtqAafscAq546Vhs= X-Google-Smtp-Source: AMrXdXtZFWSVYmOSFQ8nhR8k/tjB7OaEuhLXMJqhsGe9IWl7LuQcAIlFnVZszjIjoS5DxQUntIaVRw== X-Received: by 2002:a17:902:9a0b:b0:189:d3dc:a9c4 with SMTP id v11-20020a1709029a0b00b00189d3dca9c4mr23385440plp.36.1672215925981; Wed, 28 Dec 2022 00:25:25 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id im22-20020a170902bb1600b00192944e3650sm1190041plb.268.2022.12.28.00.25.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Dec 2022 00:25:25 -0800 (PST) X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=casouri@gmail.com; helo=mail-pl1-x633.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:251977 Archived-At: Hey Theo and Jostein, As the complete feature freeze approaching, I think it=E2=80=99s a good = time to standardize the font-lock features. Below is the change I would make to csharp-ts-mode: - take string_interpolation out of string - add function, variable feature - change attribute to property - expression is not in the list, no harm to keep it around, of course - maybe add assignment feature Feel free to correct me if I misunderstood anything. TIA! Below is the list of standard features, for your reference: Basic tokens: delimiter ,.; (delimit things) operator =3D=3D !=3D || (produces a value) bracket []{}() misc-punctuation anything else constant true, false, null number keyword comment (includes doc-comments) string (includes chars and docstrings) string-interpolation f"text {variable}" escape-sequence "\n\t\\" function every function identifier variable every variable identifier type every type identifier property a.b <--- highlight b key { a: b, c: d } <--- highlight a, c error highlight parse error Abstract features: assignment: the LHS of an assignment (thing being assigned to), eg: a =3D b <--- highlight a a.b =3D c <--- highlight b a[1] =3D d <--- highlight a definition: the thing being defined, eg: int a(int b) { <--- highlight a return 0 } int a; <-- highlight a struct a { <--- highlight a int b; <--- highlight b }