Conversation
I almost got brain aneurysm thinking that the query syntax of tree-sitter and ast-grep differ.

Fortunately that's not the case, but - contrary to Internet wisdom - query syntax is not compatible between languages (parsers).

Also, ast-grep's Playground is insanely useful:

https://ast-grep.github.io/playground.html
1
1
1
On the other hand ast-grep's pattern/rule syntax is **not** compatible with Semgrep's :(
1
0
1

@buherator
If your ever write a bit (just a bit) about, I would be thankful.

1
0
0

@buherator
The differences about. Or just a bit about ast-grep.

1
0
0
@joxean Oh OK, I'm still learning, but this usually accumulates in some tips&tricks so I'll keep that in mind!
1
0
0

@buherator @joxean having written too many tree-sitter queries, ast-grep looks a lot friendlier for anything that isn't syntax-highlighting.

1
0
0
@tmr232 @joxean Infact I'm playing with it rn because tree-sitter query CLI doesn't seem to support structured output...
1
0
0

@buherator @joxean I've only used it in code (TypeScript, specifically, for my function control flow project)...

0
0
0