Expand description
Tree-sitter parser lifecycle and parse quality metrics.
Maintains a thread-local pool of Parser instances (one per
language) to avoid re-initializing grammars. Provides parse_tree
for single-file parsing and error_ratio for parse quality estimation.
Structs§
- Tree
Metrics - Unified metrics extracted in a single AST traversal.
Functions§
- tree_
metrics - Calculate parse metrics (error ratio and named node count) in a single AST pass.