Search in sources :

Example 1 with PerlStatementsContainer

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;
}
Also used : PerlStatementsContainer(com.perl5.lang.perl.psi.properties.PerlStatementsContainer) ASTWrapperPsiElement(com.intellij.extapi.psi.ASTWrapperPsiElement)

Aggregations

ASTWrapperPsiElement (com.intellij.extapi.psi.ASTWrapperPsiElement)1 PerlStatementsContainer (com.perl5.lang.perl.psi.properties.PerlStatementsContainer)1