@Override
      public boolean continueMatching(PsiElement start) {
        Language language = start.getLanguage();

        final PsiFile file = start.getContainingFile();
        if (file != null) {
          final Language fileLanguage = file.getLanguage();
          if (fileLanguage.isKindOf(language)) {
            // dialect
            language = fileLanguage;
          }
        }

        return language == baseLanguage;
      }
@Override
      public boolean continueMatching(PsiElement start)