diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-29 22:28:21 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-29 22:28:21 +0800 |
commit | e60aa50103d9b24819f3dc26c783c2237f873664 (patch) | |
tree | b886638fd90724e968b9201f9ab12369ba5e1113 /src/parse/parseerror.cpp | |
parent | 2a0d3a03e3f32e383ed61beb2514ac3094fffb0f (diff) | |
download | mrust-e60aa50103d9b24819f3dc26c783c2237f873664.tar.gz |
Minor tweaks to handle libcore update
Diffstat (limited to 'src/parse/parseerror.cpp')
-rw-r--r-- | src/parse/parseerror.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse/parseerror.cpp b/src/parse/parseerror.cpp index eebad982..0d58bd52 100644 --- a/src/parse/parseerror.cpp +++ b/src/parse/parseerror.cpp @@ -72,6 +72,14 @@ ParseError::Unexpected::Unexpected(const TokenStream& lex, Token tok, Token exp) pos = lex.getPosition();
::std::cout << pos << ": Unexpected(" << tok << ", " << exp << ")" << ::std::endl;
}
+ParseError::Unexpected::Unexpected(const TokenStream& lex, Token tok, ::std::vector<eTokenType> exp)
+{
+ auto pos = tok.get_pos();
+ if(pos.filename == "")
+ pos = lex.getPosition();
+ ::std::cout << pos << ": Unexpected " << tok << ", expected ";
+ ::std::cout << exp << ")" << ::std::endl;
+}
ParseError::Unexpected::~Unexpected() throw()
{
}
|