RncGrammar () { final PsiElement scope = PsiTreeUtil.getParentOfType(getElement(), RncGrammar.class, true, PsiFile.class); if (scope == null) { return null; } return PsiTreeUtil.getParentOfType(scope, RncGrammar.class, true, PsiFile.class); }