diff options
author | John Hodge (Mutabah) <acessdev@gmail.com> | 2016-12-25 17:19:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-25 17:19:27 +1100 |
commit | 753a2f44cc4c00b952cddae2ceed066ebb18a470 (patch) | |
tree | ed4bbff4be39c44c57164641f4ed32b5ad4675f0 /src/parse/parseerror.hpp | |
parent | d12a8a886caf2e0edf33c1af831b1df990d2c892 (diff) | |
parent | 0c14c734fa32014fd24297ccdbed927016185ffd (diff) | |
download | mrust-753a2f44cc4c00b952cddae2ceed066ebb18a470.tar.gz |
Merge pull request #11 from ubsan/whitespace-fix
No more tears!
Diffstat (limited to 'src/parse/parseerror.hpp')
-rw-r--r-- | src/parse/parseerror.hpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/parse/parseerror.hpp b/src/parse/parseerror.hpp index 0a00f60a..d6bcab6b 100644 --- a/src/parse/parseerror.hpp +++ b/src/parse/parseerror.hpp @@ -1,40 +1,40 @@ -#ifndef PARSEERROR_HPP_INCLUDED
-#define PARSEERROR_HPP_INCLUDED
-
-#include <stdexcept>
-#include "tokenstream.hpp"
-#include <compile_error.hpp>
-
-namespace ParseError {
-
-using CompileError::Generic;
-using CompileError::BugCheck;
-using CompileError::Todo;
-
-class BadChar:
- public CompileError::Base
-{
- //char m_char;
-public:
- BadChar(const TokenStream& lex, char character);
- virtual ~BadChar() throw ();
-
-};
-
-class Unexpected:
- public CompileError::Base
-{
- Token m_tok;
-public:
- Unexpected(const TokenStream& lex, const Token& tok);
- Unexpected(const TokenStream& lex, const Token& tok, Token exp);
- Unexpected(const TokenStream& lex, const Token& tok, ::std::vector<eTokenType> exp);
- virtual ~Unexpected() throw ();
-
-};
-
-#define ASSERT(lex, cnd) do { if( !(cnd) ) throw CompileError::BugCheck(lex, "Assertion failed: " __FILE__ " - " #cnd); } while(0)
-
-}
-
-#endif // PARSEERROR_HPP_INCLUDED
+#ifndef PARSEERROR_HPP_INCLUDED +#define PARSEERROR_HPP_INCLUDED + +#include <stdexcept> +#include "tokenstream.hpp" +#include <compile_error.hpp> + +namespace ParseError { + +using CompileError::Generic; +using CompileError::BugCheck; +using CompileError::Todo; + +class BadChar: + public CompileError::Base +{ + //char m_char; +public: + BadChar(const TokenStream& lex, char character); + virtual ~BadChar() throw (); + +}; + +class Unexpected: + public CompileError::Base +{ + Token m_tok; +public: + Unexpected(const TokenStream& lex, const Token& tok); + Unexpected(const TokenStream& lex, const Token& tok, Token exp); + Unexpected(const TokenStream& lex, const Token& tok, ::std::vector<eTokenType> exp); + virtual ~Unexpected() throw (); + +}; + +#define ASSERT(lex, cnd) do { if( !(cnd) ) throw CompileError::BugCheck(lex, "Assertion failed: " __FILE__ " - " #cnd); } while(0) + +} + +#endif // PARSEERROR_HPP_INCLUDED |