private static CompilerMessageCategory kindToCategory(Diagnostic.Kind kind) {
    return switch (kind) {
      case ERROR -> CompilerMessageCategory.ERROR;
      case MANDATORY_WARNING, WARNING -> CompilerMessageCategory.WARNING;
      default -> CompilerMessageCategory.INFORMATION;
    };
  }
private static CompilerMessageCategory kindToCategory(Diagnostic.Kind kind)