summaryrefslogtreecommitdiff
path: root/src/parse/parseerror.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/parseerror.hpp')
-rw-r--r--src/parse/parseerror.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse/parseerror.hpp b/src/parse/parseerror.hpp
index bfea40b3..911312c5 100644
--- a/src/parse/parseerror.hpp
+++ b/src/parse/parseerror.hpp
@@ -29,6 +29,7 @@ class BugCheck:
::std::string m_message;
public:
BugCheck(::std::string message);
+ BugCheck(const TokenStream& lex, ::std::string message);
virtual ~BugCheck() throw () {}
};
@@ -64,6 +65,8 @@ public:
};
+#define ASSERT(lex, cnd) do { if( !(cnd) ) throw ParseError::BugCheck(lex, "Assertion failed: "#cnd); } while(0)
+
}
#endif // PARSEERROR_HPP_INCLUDED