From 936f996c4091266e9404f346e2939e613121f74c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 18 Jun 2009 20:45:40 +0000 Subject: Make source location mandatory parameter for Error. git-svn-id: http://svn.drobilla.net/resp/tuplr@121 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- tuplr.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tuplr.hpp') diff --git a/tuplr.hpp b/tuplr.hpp index efcba1f..2f66d9f 100644 --- a/tuplr.hpp +++ b/tuplr.hpp @@ -50,7 +50,7 @@ struct Cursor { /// Compiler error struct Error { - Error(const string& m, Cursor c=Cursor()) : msg(m), loc(c) {} + Error(const string& m, Cursor c) : msg(m), loc(c) {} const string what() const { return (loc ? loc.str() + ": " : "") + "error: " + msg; } string msg; Cursor loc; @@ -220,7 +220,7 @@ struct ATuple : public AST, public vector { return false; } void constrain(TEnv& tenv, Constraints& c) const; - CValue compile(CEnv& cenv) { throw Error("tuple compiled"); } + CValue compile(CEnv& cenv) { throw Error("tuple compiled", loc); } }; /// Type Expression, e.g. "Int", "(Fn (Int Int) Float)" -- cgit v1.2.1