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.devel Subject: Re: Tree sitter support for C-like languages Date: Tue, 22 Nov 2022 17:55:03 -0800 Message-ID: <6A794B32-5291-4AB9-8940-99302B309E5A@gmail.com> References: <87tu36em9t.fsf@thornhill.no> <33EE9B30-C6EC-48D1-BEAF-ABAA1350C870@gmail.com> <87tu2y4qhq.fsf@thornhill.no> <0D2879BC-E8B4-40DA-9D6B-990D408D2409@gmail.com> <87cz9g8sok.fsf@thornhill.no> 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="26985"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 23 02:55:30 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oxez4-0006qL-1O for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Nov 2022 02:55:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxeyk-0000eN-DO; Tue, 22 Nov 2022 20:55:10 -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 1oxeyi-0000e1-OT for emacs-devel@gnu.org; Tue, 22 Nov 2022 20:55:09 -0500 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxeyh-0001d0-4o for emacs-devel@gnu.org; Tue, 22 Nov 2022 20:55:08 -0500 Original-Received: by mail-pl1-x62a.google.com with SMTP id g10so15338757plo.11 for ; Tue, 22 Nov 2022 17:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Frk65iNNcx7wNkN67cwXdbCkI/u7R0s+lNxkr/bJteI=; b=qV074/1KSArzWCATfiN/nm5a6EmEEqDAAzrPQp5bvq/QlNUIZo5tNC6b1vP6X5Umr0 /87xGvUgLdVhQGUS+Evlu2c3/wgFSWjK4VkAd8lwmZ7eFWpH+/mW13Sv/2MqoHGklFHL TfDL46wSeuyCSrEMvHTY2h/9QNlc+pcNcHtjLJmiZ+i5VC895WbBpUKLfQA1LsXla32I eYIaXFKogdxR+BkM6R3+nS+eKxWTGZHXJyc6DsXf+dTpOLL0Q3zZnNbYodcaRL9Klhzf GNU/O08WeGJwclEcTr4fOlqeMHuUM2lQAx38JTS4NT9bZSCVBj3DNwTUxSpJy2jO2pAt ah7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Frk65iNNcx7wNkN67cwXdbCkI/u7R0s+lNxkr/bJteI=; b=dnTNGTgnErq4dsz+HvhglLuKRc4so9S8m7vqlAObgJZePrjma8ZG8145/GShtOL4I2 +DNI/gDqolwCgM0WDfPt/PauE8ksVHziUGDEu0/v4Je+sJ/SDKkTgTYUWSxBwsUooLhj bc2/HnE7r+7T76d2R2FFVHoA2J6VvO3AZfLn/0OxrBsOCarIV+k54+QhoddOpnT21bvq um8mEe7VoL/zEq31SP9fWScJ/8jX54AjwNRoMvRO07E3N69CUeXuakCHrN5k7kJ74bie Y8iH4kbWr7gx3/Mw3HqU+/wU/mhQyyoZeikSGEbsJdNeEXEY3o8zdobFUub47eycrGAP Pyfw== X-Gm-Message-State: ANoB5pkKugHrzpEMPLL4ROWdaN+M05OFd1kBi4YPrVN1kXAikYJ/Clti hPn7LeHOAq80Jy/q3W+HTq9OZvwgz/rfwA== X-Google-Smtp-Source: AA0mqf6h9a9oEwKViXePV5ZqXF2sF17LQT8N8vM87IPPi5E0q6cTzAUTBSLfbz5SS0Cr1RdnoIj99A== X-Received: by 2002:a17:903:285:b0:189:25fb:ad0d with SMTP id j5-20020a170903028500b0018925fbad0dmr9780907plr.29.1669168505756; Tue, 22 Nov 2022 17:55:05 -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 z24-20020a62d118000000b0056cd54ac8a0sm11230977pfg.197.2022.11.22.17.55.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2022 17:55:04 -0800 (PST) In-Reply-To: <87cz9g8sok.fsf@thornhill.no> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=casouri@gmail.com; helo=mail-pl1-x62a.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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300370 Archived-At: > On Nov 21, 2022, at 3:15 AM, Theodor Thornhill = wrote: >=20 >>>=20 >>> On Nov 16, 2022, at 12:58 PM, Yuan Fu wrote: >>>=20 >>>>>=20 >>>>> :language mode >>>>> :override t >>>>> :feature 'statement >>>>> '((expression_statement (identifier) = @font-lock-variable-name-face) >>>>> (labeled_statement >>>>> label: (statement_identifier) @font-lock-type-face)) >>>>>=20 >>>>=20 >>>> stuff like: >>>> ``` >>>> add_edge: // <- this thing >>>> gx +=3D WINDOW_LEFT_EDGE_X (w); >>>> gy +=3D WINDOW_TOP_EDGE_Y (w); >>>>=20 >>>> store_rect: // <- and this thing >>>> STORE_NATIVE_RECT (*rect, gx, gy, width, height); >>>>=20 >>>> ``` >>>=20 >>> What=E2=80=99s the intention of this query? >>>=20 >>> (expression_statement (identifier) @font-lock-variable-name-face) >>>=20 >>> It seems to match statements like >>>=20 >>> var; >>>=20 >>> ? >>>=20 >>> Yuan >>=20 >> You probably missed this message, ping :-) >>=20 >=20 > Yeah, sorry! I think it can be removed. I really don't remember why = I > made that... >=20 > I added the fix in a patch, and also fixed a typo (I think that messed > up some fontlocking in c-ts-mode) as an apology :-) >=20 > Theo Thanks! Though I made those changes before I got to the patch. Patch = appreciated :-) Yuan=