[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter api
From: |
Yuan Fu |
Subject: |
Re: Tree-sitter api |
Date: |
Sun, 5 Sep 2021 16:58:38 -0700 |
>
> 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:
>
> --------------------------------------------
>
> 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 = tree_sitter_c-sharp();
> ^
> 2 errors generated.
> binding.cc:2:10: fatal error: 'node.h' file not found
> #include <node.h>
> ^~~~~~~~
> 1 error generated.
>
> ----------------------------------------------
>
> 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’ve fixed the build script and it now
should build c-sharp.
Yuan
Re: Tree-sitter api, Tuấn-Anh Nguyễn, 2021/09/04
Re: Tree-sitter api, Yuan Fu, 2021/09/04
Re: Tree-sitter api, Theodor Thornhill, 2021/09/05
- Re: Tree-sitter api,
Yuan Fu <=