diff options
author | David Robillard <d@drobilla.net> | 2009-06-29 06:38:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-29 06:38:59 +0000 |
commit | bcc1bc3a8c648daa059daf832ac04ad907c58129 (patch) | |
tree | 156caa4910f59858d60c86db9d45a74d6d2e7c14 /src/parse.cpp | |
parent | 104ad6fde8f16f6f10fc1e94492f7358748abb57 (diff) | |
download | resp-bcc1bc3a8c648daa059daf832ac04ad907c58129.tar.gz resp-bcc1bc3a8c648daa059daf832ac04ad907c58129.tar.bz2 resp-bcc1bc3a8c648daa059daf832ac04ad907c58129.zip |
Tidy.
git-svn-id: http://svn.drobilla.net/resp/tuplr@169 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/parse.cpp')
-rw-r--r-- | src/parse.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/parse.cpp b/src/parse.cpp index c557c66..e37f095 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -74,10 +74,8 @@ parseLiteral(PEnv& penv, const SExp& exp, void* arg) inline AST* parseFn(PEnv& penv, const SExp& exp, void* arg) { - if (exp.size() < 2) - throw Error(exp.loc, "Missing function parameters and body"); - else if (exp.size() < 3) - throw Error(exp.loc, "Missing function body"); + THROW_IF(exp.size() < 2,exp.loc, "Missing function parameters and body"); + THROW_IF(exp.size() < 3, exp.loc, "Missing function body"); SExp::const_iterator a = exp.begin(); ++a; AFn* ret = tup<AFn>(exp.loc, penv.sym("fn"), new ATuple(penv.parseTuple(*a++)), 0); while (a != exp.end()) |