diff options
author | David Robillard <d@drobilla.net> | 2009-06-18 20:45:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-18 20:45:40 +0000 |
commit | 936f996c4091266e9404f346e2939e613121f74c (patch) | |
tree | 737f02b112cd6d98a0abdc11b2a84591b1493b8e /tuplr.hpp | |
parent | d8c876402bb348abc7d1fb539f245e7ba8c4ce27 (diff) | |
download | resp-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.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)" |