Add ast_grep tool: structural code search via ast-grep

AST-level pattern matching — find code by structure, not text.
e.g. find all `if let Some($X) = $Y { $$$BODY }` patterns.
Supports C, Rust, Python, JS/TS, Go, and 20+ languages.

Gracefully errors if sg binary isn't installed.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-09 02:57:02 -04:00 committed by Kent Overstreet
parent c53c4f9071
commit ec7e11db56
5 changed files with 552 additions and 5 deletions

View file

@ -1 +0,0 @@
{"sessionId":"463c6050-b49f-4509-9d4b-4596af79a90e","pid":61703,"acquiredAt":1775698574304}