[Top][All Lists]

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

Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitte

From: Eli Zaretskii
Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter
Date: Wed, 28 Jul 2021 16:32:45 +0300

> From: Andrei Kuznetsov <r12451428287@163.com>
> Cc: spacibba@aol.com,  stephen_leake@stephe-leake.org,  emacs-devel@gnu.org
> Date: Wed, 28 Jul 2021 21:27:43 +0800
> Eli Zaretskii <eliz@gnu.org> writes:
> >> While tree-sitter may be nice and all, it doesn't seem to offer the
> >> usual extensibility expected from Emacs.
> > Which extensibility did you have in mind that TS doesn't support?
> Let us assume that a generated TS grammar contains a (C) function akin
> to `semantic-lex-unterminated-syntax-detected', and I wish to achieve
> similar results to binding
> `semantic-lex-unterminated-syntax-end-function' to a function of my
> choice.  Would that be possible?

(TS doesn't generate a grammar, it comes with grammar files prepared

If you are talking about affecting how TS does lexical analysis for
some language, then I see no reason why we in the Emacs project would
want to do that.  We don't _want_ to develop parsers if we can use
parsers available out there.  Lexical analysis of a parser is
determined by the language it parses, so you need only to change the
parser when the language changes, or to fix a bug.  Both are part of
the job of the TS developers, so there should be no need for us to get
busy with that.  Exactly like we do with other libraries we use that
aren't developed as part of the Emacs project.

reply via email to

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