Expand description
Host-side tree-sitter query helper.
Built-in plugins receive ctx.tree and ctx.ts_language and can run
tree-sitter S-expression queries directly via run_query. WASM plugins go
through the tree_query host import (see crate::wasm) — both paths
ultimately call this helper.
Lines in QueryMatch are 1-based to match FunctionInfo /
ClassInfo / CommentInfo. Columns are 0-based byte offsets.
Structs§
Functions§
- node_
to_ match - 1-based lines (matches
FunctionInfoconvention). - run_
queries - run_
query - Outer
Vec= each pattern match, inner = captures within that match (in capture-list order). Empty on pattern compile error rather than panic — pattern strings can come from external plugins.