Tree Sitter also leaves a lot to be desired for C++ editing, but that's a special problem.
Tree Sitter also leaves a lot to be desired for C++ editing, but that's a special problem.
I have been improving ast-grep's documentation since the release of the project.
It is arguably not that good/abundant for resources compared to eslint/babel. But it has improved a lot (say, example page[0] and deep dive page[1]). The doc site is also carefully crafted to make it accessible, compared to libcst or other similar projects.
I also appreciate blogs/introductions to ast-grep if the community can help! Let me know if there are issues/problems when using ast-grep!
Was it possible to use it entirely as a CLI tool without any YAML 6 months ago?
something:
subkey: |
I can put any characters I like in here
And they "won't be messed up" by anything
Because they are part of a multi-line stringI don't know your exact use case but it sounds a little bit hard to me. I guess you want to change things like this.
```cpp
add_macro(a, b, c, d); // before
a + b + c + d; // after
```
It isn't that easy to do in pattern syntax. The pattern/replacement must support repetition and it isn't straightforward as far as I can tell from Rust's macro[0].
That said, if you need to support use cases like this, ast-grep has Python API to support programmatic usage[1].
[0] https://veykril.github.io/tlborm/decl-macros/macros-methodic...