logoalt Hacker News

spookylukeyyesterday at 7:19 PM1 replyview on HN

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'


Replies

evncyesterday at 7:37 PM

oh this is neat! Feels like exactly the sort of thing I was gesturing towards. Thanks :)