aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-18 20:45:40 +0000
committerDavid Robillard <d@drobilla.net>2009-06-18 20:45:40 +0000
commit936f996c4091266e9404f346e2939e613121f74c (patch)
tree737f02b112cd6d98a0abdc11b2a84591b1493b8e /tuplr.hpp
parentd8c876402bb348abc7d1fb539f245e7ba8c4ce27 (diff)
downloadresp-936f996c4091266e9404f346e2939e613121f74c.tar.gz
resp-936f996c4091266e9404f346e2939e613121f74c.tar.bz2
resp-936f996c4091266e9404f346e2939e613121f74c.zip
Make source location mandatory parameter for Error.
git-svn-id: http://svn.drobilla.net/resp/tuplr@121 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'tuplr.hpp')
-rw-r--r--tuplr.hpp4
1 files changed, 2 insertions, 2 deletions
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<AST*> {
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)"