neovim/test/functional/treesitter
Thomas Vigouroux bd5008de07
fix(treesitter): correctly handle query quantifiers (#24738)
Query patterns can contain quantifiers (e.g. (foo)+ @bar), so a single
capture can map to multiple nodes. The iter_matches API can not handle
this situation because the match table incorrectly maps capture indices
to a single node instead of to an array of nodes.

The match table should be updated to map capture indices to an array of
nodes. However, this is a massively breaking change, so must be done
with a proper deprecation period.

`iter_matches`, `add_predicate` and `add_directive` must opt-in to the
correct behavior for backward compatibility. This is done with a new
"all" option. This option will become the default and removed after the
0.10 release.

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: MDeiml <matthias@deiml.net>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2024-02-16 11:54:47 -06:00
..
fold_spec.lua revert: "feat(treesitter): add foldtext with treesitter highlighting" 2024-01-27 08:38:56 +08:00
highlight_spec.lua fix(treesitter): correctly handle query quantifiers (#24738) 2024-02-16 11:54:47 -06:00
inspect_tree_spec.lua feat(treesitter): show root nodes in :InspectTree (#26944) 2024-02-06 14:51:53 -06:00
language_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
node_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00
parser_spec.lua fix(treesitter): correctly handle query quantifiers (#24738) 2024-02-16 11:54:47 -06:00
utils_spec.lua refactor: format test/* 2024-01-03 02:09:29 +01:00