feat(cpp-object-oriented-modular-refactoring): step 3 - foundation-google-style

This commit is contained in:
KOKO\Mimi
2026-08-16 04:26:14 +09:00
parent 2628ed3488
commit 042edadffb
93 changed files with 3144 additions and 3175 deletions
+31
View File
@@ -0,0 +1,31 @@
#ifndef FESA_CORE_DIAGNOSTIC_H_
#define FESA_CORE_DIAGNOSTIC_H_
#include <string>
#include <vector>
#include "fesa/core/source_identity.h"
namespace fesa {
/// @brief Distinguishes recoverable warnings from operation-stopping errors.
enum class Severity { kWarning, kError };
/// @brief Carries a structured, backend-independent diagnostic record.
struct Diagnostic {
Severity severity;
std::string code;
SourceLocation location;
std::string keyword;
std::string entity_identity;
std::string message;
};
/// @brief Orders diagnostics by their externally visible source tuple.
/// @param diagnostics Records to reorder in place.
/// @note Records with identical keys retain their discovery order.
void SortDiagnostics(std::vector<Diagnostic>& diagnostics);
} // namespace fesa
#endif // FESA_CORE_DIAGNOSTIC_H_