void (@NotNull CompiledPattern pattern) { final ValidatingVisitor visitor = new ValidatingVisitor(); final NodeIterator nodes = pattern.getNodes(); while (nodes.hasNext()) { nodes.current().accept(visitor); nodes.advance(); } nodes.reset(); }