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