Structural Search
Search code by its abstract syntax tree (AST) structure. Finds semantic patterns that regex cannot match reliably.
Tools
| Tool | Command | Use For | |------|---------|---------| | ast-grep | sg -p 'pattern' | AST-aware code search |
Pattern Syntax
| Pattern | Matches | Example | |---------|---------|---------| | $NAME | Named identifier | function $NAME() {} | | $_ | Any single node | console.log($_) | | $$$ | Zero or more nodes | function $_($$$) {}
[Description truncada. Veja o README completo no GitHub.]