Structural Search โ
Problem โ
Text search cannot express "an addition inside a multiplication" or "all calls with three arguments".
Why tree-sitter.zig helps โ
Patterns describe nesting directly: (term (_) @a "*" @op (_) @b) finds multiplications regardless of formatting.
API โ
Query with nested patterns, fields, and quantifiers; QueryCursor with match limits.
Architecture โ
text
Pattern โ compile once โ execute per file โ ranked matches