emacs-devel
[Top][All Lists]
Advanced

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

Re: MPS: treesit


From: Yuan Fu
Subject: Re: MPS: treesit
Date: Tue, 25 Jun 2024 21:35:11 -0700


> On Jun 25, 2024, at 12:44 AM, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> 
>> Can somone help and explain how this works in treesit.c? Where is the
>> Lisp_TS_Parser stored and how/where is the TSParser * that gets passed
>> to the treesiter dylib translated to the Lisp_TS_Parser *?
> 
> Forget that question, I see it, TSInput and so on. But I'd be interested
> if there are other such constructs in treesit?
> 

If you mean tree-sitter struct that’s exposed to lisp, there are 
Lisp_TS_Parser, Lisp_TS_Node, and Lisp_TS_Query. Lisp_TS_Node is a node in the 
parser tree, Lisp_TS_Query is a lazily compiled query. Tree-sitter queries, 
like regexp, are compiled from string to tree-sitter’s internal struct before 
being used. HTH.

Yuan


reply via email to

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