unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Mickey Petersen <mickey@fyeah.org>
Cc: emacs-devel@gnu.org
Subject: Re: Status update of tree-sitter features
Date: Wed, 28 Dec 2022 16:15:45 -0800	[thread overview]
Message-ID: <FECF10D1-1C43-4E6E-9971-0BA709B183A6@gmail.com> (raw)
In-Reply-To: <87mt77cz0x.fsf@fyeah.org>

> 
> Looks useful. But this, I think, goes back to the issue I raised with you in an email: that queries are recursive, as each query is (I pressume this is how it is done in tree-sitter) applied to each node in the tree. That makes it very hard to build a query that pattern matches against nested nodes only once. It is very hard, when you have recursive queries with self-similar matches, to filter out recursed matches. Particularly when you are writing generic code that merely acts on the output of arbitrary queries.
> 
> #pred is surely no different to applying `seq-filter' or similar to the query result, no?

No, I don’t think there’s any significant difference. #pred is just a bit nicer for other people to use the query, because the filter is embedded in the query.

Yuan




  reply	other threads:[~2022-12-29  0:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28  9:44 Status update of tree-sitter features Yuan Fu
2022-12-28 15:40 ` Mickey Petersen
2022-12-29  0:15   ` Yuan Fu [this message]
2022-12-28 23:27 ` Dmitry Gutov
2022-12-29  0:23   ` Yuan Fu
2022-12-29  0:34     ` Dmitry Gutov
2022-12-29  9:21       ` Yuan Fu
2022-12-29 16:38         ` Dmitry Gutov
2022-12-30 11:16           ` Yuan Fu
2022-12-30 23:41             ` Dmitry Gutov
2022-12-31 22:15               ` Yuan Fu
2022-12-29  3:28     ` Stefan Monnier
2022-12-29  9:23       ` Yuan Fu
2022-12-30 14:27       ` Jostein Kjønigsen
2022-12-30 15:37         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FECF10D1-1C43-4E6E-9971-0BA709B183A6@gmail.com \
    --to=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mickey@fyeah.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).