@Override
    public void visitErrorElement(@NotNull PsiErrorElement element) {
      if (myAllowDanglingElse && !codeFound && JavaPsiBundle.message("else.without.if").equals(element.getErrorDescription())) {
        return;
      }
      invalidCode = true;
      stopWalking();
    }
@Override
    public void visitErrorElement(@NotNull PsiErrorElement element)