From: Yuan Fu <casouri@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>, Eli Zaretskii <eliz@gnu.org>,
Helmut Eller <eller.helmut@gmail.com>
Subject: Re: MPS: treesit
Date: Tue, 25 Jun 2024 21:35:11 -0700 [thread overview]
Message-ID: <B1650561-578E-4D60-8CBA-828DEF0E8BDA@gmail.com> (raw)
In-Reply-To: <m2r0clbh5p.fsf@pro2.fritz.box>
> 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
next prev parent reply other threads:[~2024-06-26 4:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 5:27 MPS: treesit Gerd Möllmann
2024-06-25 7:44 ` Gerd Möllmann
2024-06-25 8:28 ` Gerd Möllmann
2024-06-25 15:23 ` Eli Zaretskii
2024-06-26 4:35 ` Yuan Fu
2024-06-26 4:35 ` Yuan Fu [this message]
2024-06-26 4:54 ` Gerd Möllmann
2024-06-26 5:18 ` Yuan Fu
2024-06-26 5:25 ` Gerd Möllmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B1650561-578E-4D60-8CBA-828DEF0E8BDA@gmail.com \
--to=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=gerd.moellmann@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.