Brian Hicks describes the tool he wrote that lets you search code quickly based on AST nodes rather than strings using tree-sitter grammars and search queries. Currently you can search Elm, Haskell, JavaScript, Ruby, Rust, and TypeScript, and one of the goals of the project is to make it easy to add more languages.

Also check out the browser UI for tree-sitter-elm below - it might be helpful in working out how to write Elm queries for tree-grepper.


Want to receive more content like this in your inbox?