[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
- Status update of tree-sitter features, Yuan Fu, 2022/12/28
- Re: Status update of tree-sitter features, Mickey Petersen, 2022/12/28
- Re: Status update of tree-sitter features,
Yuan Fu <=
- Re: Status update of tree-sitter features, Dmitry Gutov, 2022/12/28
- Re: Status update of tree-sitter features, Yuan Fu, 2022/12/28
- Re: Status update of tree-sitter features, Dmitry Gutov, 2022/12/28
- Re: Status update of tree-sitter features, Yuan Fu, 2022/12/29
- Re: Status update of tree-sitter features, Dmitry Gutov, 2022/12/29
- Re: Status update of tree-sitter features, Yuan Fu, 2022/12/30
- Re: Status update of tree-sitter features, Dmitry Gutov, 2022/12/30
- Re: Status update of tree-sitter features, Yuan Fu, 2022/12/31
- Re: Status update of tree-sitter features, Stefan Monnier, 2022/12/28
- Re: Status update of tree-sitter features, Yuan Fu, 2022/12/29