Adding new method in TreeVisitor