emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree-sitter api


From: Eli Zaretskii
Subject: Re: Tree-sitter api
Date: Fri, 10 Sep 2021 09:32:56 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Thu, 9 Sep 2021 19:06:28 -0700
> Cc: Tuấn-Anh Nguyễn <ubolonton@gmail.com>,
>  Theodor Thornhill <theo@thornhill.no>,
>  Stephen Leake <stephen_leake@stephe-leake.org>,
>  Clément Pit-Claudel <cpitclaudel@gmail.com>,
>  Stefan Monnier <monnier@iro.umontreal.ca>,
>  emacs-devel@gnu.org
> 
> > TS doesn’t load the module, it expects the user to pass it a pointer to the 
> > language definition. How does the user get the language definition is not 
> > its business. The user is supposed to combine TS and a language definition 
> > to create a workable parser. See:
> > 
> > bool ts_parser_set_language(TSParser *self, const TSLanguage *language);
> > 
> > TS only wants a pointer to a TSLanguage.
> > 
> > All the language modules have regular names, i.e., tree-sitter-<lang>.so, 
> > so I think we can just calculate the name from the language name; or we can 
> > add a backup: use an alist to map language names to module names to cover 
> > possible irregular names.
> 
> If you think it’s fine, Eli, I’ll start working on this.

Sure.  I guess we will have to have a database of module names for
each programming language somewhere?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]