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 api Date: Sun, 5 Sep 2021 16:58:38 -0700 Message-ID: References: <83r1f7hydn.fsf@gnu.org> <95F37923-5BF9-4D81-B361-267CF119FBCA@gmail.com> <735AF34C-FD18-4A6A-A99D-E5D8EB4DE4F3@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) 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="4834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stephen Leake , Eli Zaretskii , =?utf-8?Q?Cl=C3=A9ment_Pit-Claudel?= , Stefan Monnier , emacs-devel To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 06 01:59:36 2021 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 1mN22x-00018A-TB for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Sep 2021 01:59:35 +0200 Original-Received: from localhost ([::1]:55240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mN22w-0004VC-1Y for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Sep 2021 19:59:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN227-0003qP-JN for emacs-devel@gnu.org; Sun, 05 Sep 2021 19:58:43 -0400 Original-Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:39630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mN226-0002QJ-07; Sun, 05 Sep 2021 19:58:43 -0400 Original-Received: by mail-oi1-x229.google.com with SMTP id v2so6822097oie.6; Sun, 05 Sep 2021 16:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Njumb7kpVtnzsCnasUTyhQBgzm82y6CFr4mnCgRN780=; b=iUsgqoHDGjCKkpEoB6IzoPyW02exKo9fMtveVelpeQLRJWeijFbvbZiZYEUhe6retG K/pZXSVJg6im+RpZvyNgA7wiSwUzQQPjkRI5FxLQtqtd+qbP2bk0wll0IasDB4BWzSiA CAYsH/7IRbsMcBylx2Y/TAKb4ZjRz0i91ZMWkCZKRfiiTAF3GNq1hCyyaYOG6f1jE+rQ EfsdNhEq4OQCDmScNK21xWhST5fwI9OpzdrjKgnKkrJPLKF7x0KJ6sEYYuOnSbQjjEKm WXgULsWJMItzrstj0GrXVcwq/VZUWxTLinBg5b2BQMYK9pyO5YbE2LhawannMNTY7FFs ipPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Njumb7kpVtnzsCnasUTyhQBgzm82y6CFr4mnCgRN780=; b=TiASb5jDoDaRvFxsFPD6fATGSeFmOwMNPJ8Wd30YiSfe5kwtwUQu6xgKiPjPw903+j aFV6NR+xHfOBWLLGgk/Ad+FlTRQ5swrYb+DUOfFseOfUkT+Mez1YkFSTKY4lTpD6Ryn9 Y3QqWJB8w5x50qowmNYjj4zYyfOett4BmWbmGHjpjQ9AwyBP5/THI56A7Mze0axNX44L NYna4ROkDEhhoHaeA5NeK0EIRDWupeFvrxXCt0/V70wS/Lm2u/QdmRSN8HAoX6DQ9WTa iEiH9l51qpgGM2nteOBH0PdVEUTcFi6ymm1tvbpPlyLKwkN/5EYrT1us/VNkPr2a4YP5 Jeog== X-Gm-Message-State: AOAM530QzFNGHWM3fuCnPZg0dSqv2ek/Xo8Iax1IffNITtoppTsKGmI7 Yu12mCixsizTTmeg0SDPHIo= X-Google-Smtp-Source: ABdhPJwSamkaWEOrOHxVYMs0cDjk3RLUQYbN+21eJ8jDHQzcO5RJg1+Oob58ZO+kiZ/cW7URaL5UEw== X-Received: by 2002:a05:6808:8d5:: with SMTP id k21mr6930875oij.74.1630886320356; Sun, 05 Sep 2021 16:58:40 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c9f:8d83:1bf4:cfca:c0e8]) by smtp.gmail.com with ESMTPSA id o126sm1173830oig.21.2021.09.05.16.58.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Sep 2021 16:58:39 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=casouri@gmail.com; helo=mail-oi1-x229.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.23 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" Xref: news.gmane.io gmane.emacs.devel:274040 Archived-At: >=20 > Thank you for your thorough instructions. I've been able to compile = it > on my system, but I'm having trouble with the c-sharp module. I get > this error: >=20 > -------------------------------------------- >=20 > Cloning into 'tree-sitter-c-sharp'... > remote: Enumerating objects: 62, done. > remote: Counting objects: 100% (62/62), done. > remote: Compressing objects: 100% (57/57), done. > remote: Total 62 (delta 17), reused 19 (delta 0), pack-reused 0 > Receiving objects: 100% (62/62), 831.92 KiB | 2.12 MiB/s, done. > Resolving deltas: 100% (17/17), done. > tree-sitter-c-sharp.c:7:33: error: expected ';' after top level = declarator > extern TSLanguage *tree_sitter_c-sharp(void); > ^ > ; > tree-sitter-c-sharp.c:16:40: error: implicit declaration of function = 'sharp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > TSLanguage *language =3D tree_sitter_c-sharp(); > ^ > 2 errors generated. > binding.cc:2:10: fatal error: 'node.h' file not found > #include > ^~~~~~~~ > 1 error generated. >=20 > ---------------------------------------------- >=20 > I'm guessing this is due to the hyphen in the function name. I = remember > we had to do some shenanigans in the rust variant some time ago to > translate this properly. In the C files we need to use underscore > rather than hyphen, yes? If this isn't too hard to do I guess I can = try > to make a PR to your project, otherwise you at least have a bugreport > here :) I'm also looking into the code now, and it looks nice so far. > I'll come back to you when I have something more! Thanks for trying out and reporting :-) I=E2=80=99ve fixed the build = script and it now should build c-sharp. Yuan=