summaryrefslogtreecommitdiff
path: root/tools/standalone_miri/lex.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-08-09 17:37:10 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-08-09 17:37:10 +0800
commit657a5a99edf0722c9db5956ca9d42db65c9e683e (patch)
treee6e80df4812cc8c66a69c53882b8d4bdf319dfed /tools/standalone_miri/lex.cpp
parent1f94832ee98d0a6000b3fe7128829b31dc172bb0 (diff)
downloadmrust-657a5a99edf0722c9db5956ca9d42db65c9e683e.tar.gz
Standalone MIRI - More thread hackery
Diffstat (limited to 'tools/standalone_miri/lex.cpp')
-rw-r--r--tools/standalone_miri/lex.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/standalone_miri/lex.cpp b/tools/standalone_miri/lex.cpp
index 07427bde..79e94224 100644
--- a/tools/standalone_miri/lex.cpp
+++ b/tools/standalone_miri/lex.cpp
@@ -7,6 +7,8 @@
*/
#include "lex.hpp"
#include <cctype>
+#include <sstream>
+#include "debug.hpp"
#include <iostream>
bool Token::operator==(TokenClass tc) const
@@ -25,7 +27,7 @@ bool Token::operator==(const char* s) const
uint64_t Token::integer() const
{
if( this->type != TokenClass::Integer )
- throw "";
+ throw ::std::runtime_error(FMT_STRING("Expected interger, got " << *this));
return this->numbers.int_val;
}
double Token::real() const