all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: 55428@debbugs.gnu.org
Subject: bug#55428: [feature/tree-sitter] Simplify the parser creation API
Date: Sun, 15 May 2022 17:26:11 +0300	[thread overview]
Message-ID: <83h75qkh31.fsf@gnu.org> (raw)
In-Reply-To: <m1wnem990i.fsf@yahoo.es> (bug-gnu-emacs@gnu.org)

> Date: Sun, 15 May 2022 16:15:57 +0200
> From:  Daniel Martín via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> 
> Currently, there are three functions to create a tree-sitter parser:
> 
> - treesit-get-parser-create
> - treesit-get-parser
> - treesit-parser-create
> 
> I think this set of similarly named functions can be reduced, so that
> developers don't need to remember a lot of APIs.  How I understand the
> problem of creating a tree-sitter parser is that we need three things
> from the developer:
> 
> - A programming language (a symbol).
> - A buffer (optional, default to the current buffer).
> - Whether to create or reuse an existing parser for that language.
> 
> I think it would be simpler to have just one parser creation API like
> 
> (treesit-make-parser LANGUAGE &optional BUFFER ALWAYS-NEW)

I suggest that discussions about the API be held on emacs-devel, not
hear.  That way, more people will see them and could decide whether to
participate.

Thanks.





      reply	other threads:[~2022-05-15 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1wnem990i.fsf.ref@yahoo.es>
2022-05-15 14:15 ` bug#55428: [feature/tree-sitter] Simplify the parser creation API Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-15 14:26   ` Eli Zaretskii [this message]

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=83h75qkh31.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55428@debbugs.gnu.org \
    --cc=mardani29@yahoo.es \
    /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.