Move Diagnostics to separate namespace
This commit is contained in:
@@ -9,31 +9,35 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
class DiagnosticsHolder {
|
||||
bool _hasErrors;
|
||||
vector<Diagnostic> _diagnostics;
|
||||
public:
|
||||
DiagnosticsHolder(){
|
||||
_hasErrors = false;
|
||||
}
|
||||
namespace Porygon::Diagnostics {
|
||||
class DiagnosticsHolder {
|
||||
bool _hasErrors;
|
||||
vector<Diagnostic> _diagnostics;
|
||||
public:
|
||||
DiagnosticsHolder() {
|
||||
_hasErrors = false;
|
||||
}
|
||||
|
||||
~DiagnosticsHolder(){
|
||||
_diagnostics.clear();
|
||||
}
|
||||
~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);
|
||||
void Log(DiagnosticSeverity severity, DiagnosticCode code, unsigned int start, unsigned int length);
|
||||
|
||||
bool HasErrors();
|
||||
void LogError(DiagnosticCode code, unsigned int start, unsigned int length);
|
||||
|
||||
vector<Diagnostic> GetDiagnostics();
|
||||
void LogWarning(DiagnosticCode code, unsigned int start, unsigned int length);
|
||||
|
||||
int DiagnosticsCount();
|
||||
void LogInfo(DiagnosticCode code, unsigned int start, unsigned int length);
|
||||
|
||||
Diagnostic* GetDiagnosticAt(int position);
|
||||
};
|
||||
bool HasErrors();
|
||||
|
||||
vector<Diagnostic> GetDiagnostics();
|
||||
|
||||
int DiagnosticsCount();
|
||||
|
||||
Diagnostic *GetDiagnosticAt(int position);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //PORYGONLANG_DIAGNOSTICSHOLDER_HPP
|
||||
|
||||
Reference in New Issue
Block a user