diff options
Diffstat (limited to 'tuplr.cpp')
-rw-r--r-- | tuplr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -72,7 +72,7 @@ readExpression(Cursor& cur, istream& in) while (int c = readChar(cur, in)) { switch (c) { case EOF: - if (!stk.empty()) throw Error("unexpected end of file", cur); + THROW_IF(!stk.empty(), "unexpected end of file", cur) return SExp(cur); case ';': while ((c = readChar(cur, in)) != '\n') {} @@ -127,7 +127,7 @@ readExpression(Cursor& cur, istream& in) inline SExp macDef(PEnv& penv, const SExp& exp) { - if (exp.size() != 3) throw Error("`def' requires exactly 2 arguments", exp.loc); + THROW_IF(exp.size() != 3, "[MAC] `def' requires exactly 2 arguments", exp.loc) if (exp.at(1).type == SExp::ATOM) { return exp; } else { |