Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] add tutorial pages #154

Open
HerringtonDarkholme opened this issue Jun 27, 2023 · 0 comments
Open

[doc] add tutorial pages #154

HerringtonDarkholme opened this issue Jun 27, 2023 · 0 comments

Comments

@HerringtonDarkholme
Copy link
Member

HerringtonDarkholme commented Jun 27, 2023

Basic:

  1. simple pattern
  2. simple kind
  3. simple regex
  4. multi-nodes match $$$
  5. use fix

Intermediate:

  1. Refine your pattern: pattern with context
  2. regex in pattern
  3. use and / any / not
  4. use relational rule
  5. refine relational rule I: field
  6. refine relational rule II: stopBy
  7. Example: extract child field using metavar & has

Advanced:

  1. Refine your pattern II: understand how ast-grep matches
  2. utility rule
  3. utility rule II: recursion (use recursion to munch nodes)
  4. manipulate metavar using transform
  5. DasSurma trick to handle commas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant