helixbass / tree-sitter-grep

The Unlicense
4 stars 1 forks source link

Support "no query" (with filter) mode #38

Closed helixbass closed 1 year ago

helixbass commented 1 year ago

In this PR:

To test: You should be able to build + run example filters (I added a new one which at least limits the AST node types that it produces matches for, I didn't try running in non-query mode for one of the existing ones but that is presumably a lot of AST nodes matched) with or without also passing a query argument Per the tests the output produced by clap eg when doing --help, not passing required arguments or passing an unrecognized argument shouldn't be too insane/unhelpful