use of org.whole.lang.matchers.GenericMatcherFactory in project whole by wholeplatform.
the class RewriteTest method testRewrite.
@Test
public void testRewrite() {
IEntity program = buildImpProgram();
PrettyPrinterOperation.prettyPrint(program);
GenericMatcherFactory mf = GenericMatcherFactory.instance;
GenericTraversalFactory tf = GenericTraversalFactory.instance;
IVisitor v = tf.innermost(tf.concurrentSome(mf.rewrite(IfElseEmptyPattern(), IfElseEmptyRewrite(), false), mf.rewrite(IfTruePattern(), IfTrueRewrite(), false), mf.rewrite(IfTrueElsePattern(), IfTrueRewrite(), false), mf.rewrite(IfNotPattern(), IfNotRewrite(), false)));
v.visit(program);
PrettyPrinterOperation.prettyPrint(program);
}
Aggregations