void (PsiElement parent, GroovyElementVisitor visitor) { PsiElement child = parent.getFirstChild(); while (child != null) { ProgressManager.checkCanceled(); if (child instanceof GroovyPsiElement) { ((GroovyPsiElement) child).accept(visitor); } child = child.getNextSibling(); } }