#pragma once #include "fesa/core/source_identity.hpp" #include #include namespace fesa { // Distinguishes recoverable warnings from errors that stop the current operation. enum class Severity { warning, error }; // Carries a structured, backend-independent diagnostic record. struct Diagnostic { Severity severity; std::string code; SourceLocation location; std::string keyword; std::string entityIdentity; std::string message; }; // Orders diagnostics by their externally visible source tuple while retaining // discovery order for records with identical keys. void sortDiagnostics(std::vector& diagnostics); } // namespace fesa