diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-07 12:07:43 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-07 12:07:43 +0800 |
commit | fcec09900f158aa939eb1c96607aaabf4c8171ef (patch) | |
tree | eaac668a8d19b56fee0cdafb218ec069cdab8bc5 /src/parse/expr.cpp | |
parent | a9692e359884672b30e1742bada368330115cc14 (diff) | |
download | mrust-fcec09900f158aa939eb1c96607aaabf4c8171ef.tar.gz |
Added file+line reporting to error messages
Diffstat (limited to 'src/parse/expr.cpp')
-rw-r--r-- | src/parse/expr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp index 2ed992ce..1ee3a2e2 100644 --- a/src/parse/expr.cpp +++ b/src/parse/expr.cpp @@ -155,7 +155,7 @@ AST::Pattern Parse_Pattern(TokenStream& lex) // This may also have to handle range expressions? (and other complexities)
throw ParseError::Todo("tuple patterns");
default:
- throw ParseError::Unexpected(tok);
+ throw ParseError::Unexpected(lex, tok);
}
throw ParseError::BugCheck("Parse_Pattern should early return");
}
@@ -618,7 +618,7 @@ ExprNodeP Parse_ExprVal(TokenStream& lex) return Parse_Expr0(expanded_macro);
}
default:
- throw ParseError::Unexpected(tok);
+ throw ParseError::Unexpected(lex, tok);
}
}
@@ -701,7 +701,7 @@ TokenTree Parse_TT_Val(TokenStream& lex) break;
default:
// Oh, fail :(
- throw ParseError::Unexpected(tok);
+ throw ParseError::Unexpected(lex, tok);
}
return TokenTree(ret);
}
|