]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/Tokenizer.h
introduced exception type for tokenizer
[l2e.git] / src / loader / Tokenizer.h
index 15eadf8710e20b4d42ed550ad9b72f7697d3e2e7..f2ab4aaaadd2fb5883741f8641f24917e0cff5ab 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <iosfwd>
 #include <ostream>
+#include <stdexcept>
 #include <string>
 
 namespace loader {
@@ -55,6 +56,11 @@ public:
 
        };
 
+       class LexerError: public std::runtime_error {
+       public:
+               explicit LexerError(const std::string &msg) : std::runtime_error(msg) { }
+       };
+
        bool HasMore();
        Token GetNext();
        void Putback(const Token &);