summaryrefslogtreecommitdiffstats
path: root/tools/localize/SourcePos.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/localize/SourcePos.h')
-rw-r--r--tools/localize/SourcePos.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/localize/SourcePos.h b/tools/localize/SourcePos.h
new file mode 100644
index 0000000..5027129
--- /dev/null
+++ b/tools/localize/SourcePos.h
@@ -0,0 +1,28 @@
+#ifndef SOURCEPOS_H
+#define SOURCEPOS_H
+
+#include <string>
+
+using namespace std;
+
+class SourcePos
+{
+public:
+ string file;
+ int line;
+
+ SourcePos(const string& f, int l);
+ SourcePos(const SourcePos& that);
+ SourcePos();
+ ~SourcePos();
+
+ string ToString() const;
+ int Error(const char* fmt, ...) const;
+
+ static bool HasErrors();
+ static void PrintErrors(FILE* to);
+};
+
+extern const SourcePos GENERATED_POS;
+
+#endif // SOURCEPOS_H