private void checkParent(GrExpression expression) {
      PsiElement parent = expression.getParent();
      while (parent instanceof GrParenthesizedExpression) {
        parent = parent.getParent();
      }
      if (!(parent instanceof GrUnaryExpression prefixExpression)) {
        return;
      }
      final IElementType parentTokenType = prefixExpression.getOperationTokenType();
      if (!T_NOT.equals(parentTokenType)) {
        return;
      }
      registerError(prefixExpression);
    }
private void checkParent(GrExpression expression)