aboutsummaryrefslogtreecommitdiffstats
path: root/typing.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-03-07 05:16:30 +0000
committerDavid Robillard <d@drobilla.net>2009-03-07 05:16:30 +0000
commit5faf51234f0279c057c58a6c26cf35f4266bedaf (patch)
treec00831a6a0372e86b1c20f6a65f48f9ca505e806 /typing.cpp
parent3322999a97f4170e1476fc4bff431f5ca8909333 (diff)
downloadresp-5faf51234f0279c057c58a6c26cf35f4266bedaf.tar.gz
resp-5faf51234f0279c057c58a6c26cf35f4266bedaf.tar.bz2
resp-5faf51234f0279c057c58a6c26cf35f4266bedaf.zip
Remove redundant/useless ASTCall::exp
git-svn-id: http://svn.drobilla.net/resp/tuplr@77 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'typing.cpp')
-rw-r--r--typing.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/typing.cpp b/typing.cpp
index 837b1c3..759a418 100644
--- a/typing.cpp
+++ b/typing.cpp
@@ -57,9 +57,9 @@ ASTCall::constrain(TEnv& tenv) const
void
ASTDefinition::constrain(TEnv& tenv) const
{
- if (size() != 3) throw Error("`def' requires exactly 2 arguments", exp.loc);
+ if (size() != 3) throw Error("`def' requires exactly 2 arguments", loc);
if (!dynamic_cast<const ASTSymbol*>(at(1)))
- throw Error("`def' name is not a symbol", exp.loc);
+ throw Error("`def' name is not a symbol", loc);
FOREACH(const_iterator, p, *this)
(*p)->constrain(tenv);
AType* tvar = tenv.type(this);
@@ -70,8 +70,8 @@ ASTDefinition::constrain(TEnv& tenv) const
void
ASTIf::constrain(TEnv& tenv) const
{
- if (size() < 3) throw Error("`if' requires exactly 3 arguments", exp.loc);
- if (size() % 2 != 0) throw Error("`if' missing final else clause", exp.loc);
+ if (size() < 3) throw Error("`if' requires exactly 3 arguments", loc);
+ if (size() % 2 != 0) throw Error("`if' missing final else clause", loc);
FOREACH(const_iterator, p, *this)
(*p)->constrain(tenv);
AType* retT = tenv.type(this);
@@ -99,7 +99,7 @@ ASTPrimitive::constrain(TEnv& tenv) const
else if (n == "=" || n == "!=" || n == ">" || n == ">=" || n == "<" || n == "<=")
type = COMPARISON;
else
- throw Error((format("unknown primitive `%1%'") % n).str(), exp.loc);
+ throw Error((format("unknown primitive `%1%'") % n).str(), loc);
FOREACH(const_iterator, p, *this)
(*p)->constrain(tenv);
@@ -107,31 +107,31 @@ ASTPrimitive::constrain(TEnv& tenv) const
switch (type) {
case ARITHMETIC:
if (size() < 3)
- throw Error((format("`%1%' requires at least 2 arguments") % n).str(), exp.loc);
+ throw Error((format("`%1%' requires at least 2 arguments") % n).str(), loc);
for (size_t i = 1; i < size(); ++i)
tenv.constrain(at(i), tenv.type(this));
break;
case BINARY:
if (size() != 3)
- throw Error((format("`%1%' requires exactly 2 arguments") % n).str(), exp.loc);
+ throw Error((format("`%1%' requires exactly 2 arguments") % n).str(), loc);
tenv.constrain(at(1), tenv.type(this));
tenv.constrain(at(2), tenv.type(this));
break;
case BITWISE:
if (size() != 3)
- throw Error((format("`%1%' requires exactly 2 arguments") % n).str(), exp.loc);
+ throw Error((format("`%1%' requires exactly 2 arguments") % n).str(), loc);
tenv.constrain(this, tenv.named("Bool"));
tenv.constrain(at(1), tenv.named("Bool"));
tenv.constrain(at(2), tenv.named("Bool"));
break;
case COMPARISON:
if (size() != 3)
- throw Error((format("`%1%' requires exactly 2 arguments") % n).str(), exp.loc);
+ throw Error((format("`%1%' requires exactly 2 arguments") % n).str(), loc);
tenv.constrain(this, tenv.named("Bool"));
tenv.constrain(at(1), tenv.type(at(2)));
break;
default:
- throw Error((format("unknown primitive `%1%'") % n).str(), exp.loc);
+ throw Error((format("unknown primitive `%1%'") % n).str(), loc);
}
}