emacs-devel
[Top][All Lists]
Advanced

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

Re: Status update of tree-sitter features


From: Yuan Fu
Subject: Re: Status update of tree-sitter features
Date: Wed, 28 Dec 2022 16:15:45 -0800

> 
> 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 via email to

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