use of com.perl5.lang.perl.psi.properties.PerlStatementsContainer in project Perl5-IDEA by Camelcade.
the class PerlPsiUtil method processNamespaceStatements.
public static boolean processNamespaceStatements(@NotNull PsiElement rootElement, Processor<PsiElement> processor) {
PsiElement run = rootElement.getFirstChild();
boolean result = true;
while (run != null && result) {
if (!(run instanceof PerlNamespaceDefinitionWithIdentifier)) {
if (run instanceof PerlCompositeElement) {
result = processor.process(run);
}
if (result && run instanceof PerlStatementsContainer) {
result = processNamespaceStatements(run, processor);
}
}
run = run.getNextSibling();
}
return result;
}
Aggregations