#ifndef PORYGONLANG_DIAGNOSTICS_HPP #define PORYGONLANG_DIAGNOSTICS_HPP #include #include "DiagnosticSeverity.hpp" #include "DiagnosticCode.hpp" #include "Diagnostic.hpp" using namespace std; class Diagnostics { bool _hasErrors; vector _diagnostics; public: Diagnostics(){ _hasErrors = false; } ~Diagnostics(){ _diagnostics.clear(); } void Log(DiagnosticSeverity severity, DiagnosticCode code, unsigned int start, unsigned int length); void LogError(DiagnosticCode code, unsigned int start, unsigned int length); void LogWarning(DiagnosticCode code, unsigned int start, unsigned int length); void LogInfo(DiagnosticCode code, unsigned int start, unsigned int length); bool HasErrors(); vector GetDiagnostics(); int DiagnosticsCount(); Diagnostic* GetDiagnosticAt(int position); }; #endif //PORYGONLANG_DIAGNOSTICS_HPP