Create query interface for Syntax Tree/IR
brianv0 opened this issue · comments
Brian Van Klaveren commented
The Redbaron project has an Syntax Tree query interface:
https://redbaron.readthedocs.io/en/latest/querying.html
Which is partially implemented as such:
https://github.com/PyCQA/redbaron/blob/master/redbaron/base_nodes.py#L804
Conceivably, we should be able to use the Visitor pattern to implement this.
Where this will really potentially shine is basic pattern matching where writing a new visitor is a bit more work than it's worth.