Inverting ifs in JavaParser

Inverting ifs in JavaParser

To answer a question from Kaleem on our Gitter channel, I made a little sample program that turns all if(x!=y) a else b constructs into if(x==y) b else a. I thought it would be a nice example of AST hacking with visitors in practice.

Here it is with some comments:

This project is now an offical sample project!

Be the first to comment

Leave a Reply

Your email address will not be published.