From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohammed Sadiq Newsgroups: gmane.emacs.bugs Subject: bug#60484: 29.0.60; c-ts-mode: short tokens are not identified as type_identifier Date: Mon, 02 Jan 2023 18:13:34 +0530 Message-ID: <1d2f9bd1c64ed11124a0129b0ae8b672@sadiqpk.org> References: <677a429cb107ff200396e0c59eefecda@sadiqpk.org> <83358t2kv1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22824"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60484@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 02 13:44:26 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 1pCKAz-0005iK-GR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 13:44:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCKAe-0001VH-Ck; Mon, 02 Jan 2023 07:44: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 1pCKAc-0001T0-5X for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 07:44: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 1pCKAb-0003wm-S0 for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 07:44:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCKAb-0007rP-LN for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 07:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mohammed Sadiq Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jan 2023 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60484 X-GNU-PR-Package: emacs Original-Received: via spool by 60484-submit@debbugs.gnu.org id=B60484.167266342330124 (code B ref 60484); Mon, 02 Jan 2023 12:44:01 +0000 Original-Received: (at 60484) by debbugs.gnu.org; 2 Jan 2023 12:43:43 +0000 Original-Received: from localhost ([127.0.0.1]:42667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCKAI-0007pn-Pi for submit@debbugs.gnu.org; Mon, 02 Jan 2023 07:43:43 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:57327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCKAG-0007pX-PQ for 60484@debbugs.gnu.org; Mon, 02 Jan 2023 07:43:41 -0500 Original-Received: (Authenticated sender: sadiq@sadiqpk.org) by mail.gandi.net (Postfix) with ESMTPA id 80312100008; Mon, 2 Jan 2023 12:43:34 +0000 (UTC) In-Reply-To: <83358t2kv1.fsf@gnu.org> X-Sender: sadiq@sadiqpk.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:252332 Archived-At: On 2023-01-02 17:45, Eli Zaretskii wrote: >> Date: Mon, 02 Jan 2023 10:22:09 +0530 >> From: Mohammed Sadiq >> >> Short tokens are not identified as type_identifier in GNU Emacs >> c-ts-mode, but does work fine with tree-sitter playground[0]. >> >> Say for example, 'a_type' in an empty buffer is identified as a >> type_identifier in tree-sitter playground, but not in c-ts-mode, >> while say, some longer tokens like 'window_type' is identified as >> type_identifier. > > Where is it written that FOO_type is a type identifier? is this > something new in some recent C Standard? Or is it just a popular > convention? 'a_type' was just a made up example, it can be any valid token, say 'g_file', or whatever. I was pointing out a disparity in handling of some token in c-ts-mode and tree-sitter: tree-sitter identifiers a 6 byte length token as an identifier, but c-ts-mode requires it to be at least 11 byte sized for custom types.