4 ms·
Yeah it doesn't look like this is AST-aware at all. If you want to do queries that understand the grammar, https://github.com/getgrit/gritql https://github.com
by morgante 2y ago
Yeah it doesn't look like this is AST-aware at all.
If you want to do queries that understand the grammar, https://github.com/getgrit/gritql https://github.com/getgrit/gritql is closer to what you're looking for. (Disclaimer: I'm the author.)
Ex. here's how you would search for your example of looking for a string unless it's inside a string constant. [0]
grit apply '"this_string" => `new_string` where $match <: not within string()'
[0] https://app.grit.io/studio?key=v8iA8zIbHs2uCykNpSF_G https://app.grit.io/studio?key=v8iA8zIbHs2uCykNpSF_G