Skip to main content

Module query

Module query 

Source
Expand description

Generic tree-sitter and ast-grep query execution.

Provides low-level query runners that operate on a single file’s content. Higher-level file discovery and dispatch lives in the CLI tier.

Structs§

MatchResult
Match result from either pattern type.

Functions§

is_sexp_pattern
Detect if pattern is a tree-sitter S-expression (starts with () or an ast-grep pattern (anything else).
run_astgrep_query
Run an ast-grep pattern query against a single file’s content.
run_sexp_query
Run a tree-sitter S-expression query against a single file’s content.