Settings

Theme

Cascading Tree Sitter Queries

github.com

3 points by iovrthoughtthis 21 days ago · 1 comment

Reader

iovrthoughtthisOP 21 days ago

apologies, the names is a little tongue in cheek. the goals of this is:

1. create an abstract syntax tree over the tree sitter trees for queries that work across language (function) @f matches functions in any supported language

2. create a smaller (in text) query language based on the semantics of css selectors e.g. in the 'c' language id#Validate -> [((function_definition declarator: (function_declarator declarator: (identifier) @_n0)) @_root2 (#eq? @_n0 "Validate")) ((call_expression function: (identifier) @_n1) @_root3 (#eq? @_n1 "Validate"))]

3. provide some useful commands on top of this to allow humans (and llms) to be able to quickly learn about codebases from the cli

i made this for myself, just sharing it because i probably should

yes i used claude code for most of this

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection