The project pyastgrep https://pyastgrep.readthedocs.io/en/latest/ can use CSS selectors as a query language for Python syntax (default is XPath).
e.g.:
pyastgrep --css 'Call > func > Name#main'
oh this is neat! Feels like exactly the sort of thing I was gesturing towards. Thanks :)
oh this is neat! Feels like exactly the sort of thing I was gesturing towards. Thanks :)