-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Introduction:
- introduction to ast-grep
- Why you need structural search
- what is ast? what is parser? how computer parse your code text
- introduction to tree-sitter
Basic:
- simple pattern
- simple kind
- simple regex
- multi-nodes match
$$$
- use fix
Intermediate:
- Refine your pattern: pattern with context
- Use sgconfig to setup project
- use sg test to test your rules
- regex in pattern
- use
and
/any
/not
- use relational rule 6. refine relational rule I: field7. refine relational rule II: stopBy
- Example: extract child field using metavar &
has
Advanced:
- Refine your pattern II: understand how ast-grep matches
- utility rule
- utility rule II: recursion (use recursion to munch nodes)
- manipulate metavar using transform
- DasSurma trick to handle commas
0xdevalias
Metadata
Metadata
Assignees
Labels
No labels