...
You can add whatever other tests you want once you know that you have the right trees syntactically in the right context.
Order
Seems like we sometimes want preorder to get stuff in input order and then postorder to make work on larger patterns after the inner patterns are done. E.g., work on the function after locals are examined.
XPath for parse trees
This functionality has now been integrated into theĀ master branch of antlr4.
...