Retro68/Rez/Diagnostic.h

32 lines
541 B
C
Raw Normal View History

2014-10-30 01:56:49 +00:00
#ifndef DIAGNOSTIC_H
#define DIAGNOSTIC_H
#include <string>
#include <iosfwd>
#include "location.hh"
class Diagnostic
{
public:
enum Severity
{
warning,
error,
fatalError
};
2014-10-30 01:56:49 +00:00
Diagnostic();
Diagnostic(Severity sev, std::string msg, yy::location loc);
2014-10-30 01:56:49 +00:00
private:
Severity severity;
std::string message;
yy::location location;
2014-10-30 01:56:49 +00:00
friend std::ostream& operator<<(std::ostream&, const Diagnostic&);
2014-10-30 01:56:49 +00:00
};
std::ostream& operator<<(std::ostream&, const Diagnostic&);
#endif // DIAGNOSTIC_H