tree-sitter.tree-sitter/lib
Will Lillis 91fd04f96a fix(query): short-circuit longest-match dedup for disjoint states
An unanchored quantified sibling like `(program (comment)+ @doc (class))`
keeps one match state per matching sibling. A recent fix stopped over-pruning
them, but the per-node longest-match dedup is pairwise, so with n live states
matching became O(n^3).

Two states can only be capture subsets of one another if their captured
byte ranges overlap, so keep each group ordered by first-capture position
and stop the pairwise scan once the rest of the group is disjoint.

Refs neovim/neovim#40517
2026-07-01 18:07:14 -04:00
..
binding_rust feat(rust)!: change ts_set_allocator to accept one optional Allocator 2026-06-27 23:22:11 -04:00
binding_web Add ts_query_copy for cloning queries 2026-06-27 17:53:13 -04:00
include/tree_sitter Add ts_query_copy for cloning queries 2026-06-27 17:53:13 -04:00
lldb_pretty_printers feat(lib): add lldb pretty-printers for some C lib types 2025-08-22 20:10:03 -04:00
src fix(query): short-circuit longest-match dedup for disjoint states 2026-07-01 18:07:14 -04:00
.ccls rust: Change QueryCursor::captures to expose the full match 2019-10-03 12:45:58 -07:00
Cargo.toml build(deps): bump wasmtime-c-api to v36.0.12 2026-06-26 14:07:35 +02:00
LICENSE chore: copy license to all packages 2025-09-11 03:12:35 -04:00
package.nix build(cmake)!: move CMakeLists.txt to the source root 2025-09-11 01:59:37 -04:00
README.md docs: update badges; fix markdown lint complains 2023-04-16 23:39:08 +03:00
tree-sitter.pc.in build(lib): build using cmake 2024-09-07 18:38:05 -04:00

Subdirectories

  • src - C source code for the Tree-sitter library
  • include - C headers for the Tree-sitter library
  • binding_rust - Rust bindings to the Tree-sitter library
  • binding_web - JavaScript bindings to the Tree-sitter library, using WebAssembly