Rename Diagnostics
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-06-06 19:01:54 +02:00
parent 89ada09272
commit ada2690dcd
5 changed files with 54 additions and 54 deletions

View File

@@ -0,0 +1,39 @@
#ifndef PORYGONLANG_DIAGNOSTICSHOLDER_HPP
#define PORYGONLANG_DIAGNOSTICSHOLDER_HPP
#include <vector>
#include "DiagnosticSeverity.hpp"
#include "DiagnosticCode.hpp"
#include "Diagnostic.hpp"
using namespace std;
class DiagnosticsHolder {
bool _hasErrors;
vector<Diagnostic> _diagnostics;
public:
DiagnosticsHolder(){
_hasErrors = false;
}
~DiagnosticsHolder(){
_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<Diagnostic> GetDiagnostics();
int DiagnosticsCount();
Diagnostic* GetDiagnosticAt(int position);
};
#endif //PORYGONLANG_DIAGNOSTICSHOLDER_HPP