diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-11T13·36+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-11T13·36+0000 |
commit | 5664b6d7ba28453ccdd6d1c07a707f98608500ff (patch) | |
tree | 60daaa7ce7b53cbfe2ec2a86aeb4eca792ccf7ca /src/libexpr/nixexpr.cc | |
parent | b455c4c45cba49397952e662cace85aedb6848fe (diff) |
* Removed the "valid values" feature. Nobody uses it anyway.
Diffstat (limited to 'src/libexpr/nixexpr.cc')
-rw-r--r-- | src/libexpr/nixexpr.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index 0f5ec030654f..310f714718fe 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -140,8 +140,8 @@ Expr substitute(const Substitution & subs, Expr e) if (matchFunction(e, formals, body, pos)) { ATermMap map(ATgetLength(formals)); for (ATermIterator i(formals); i; ++i) { - ATerm d1, d2; - if (!matchFormal(*i, name, d1, d2)) abort(); + ATerm d1; + if (!matchFormal(*i, name, d1)) abort(); map.set(name, makeRemoved()); } Substitution subs2(&subs, &map); @@ -230,15 +230,14 @@ static void checkVarDefs2(set<Expr> & done, const ATermMap & defs, Expr e) else if (matchFunction(e, formals, body, pos)) { ATermMap defs2(defs); for (ATermIterator i(formals); i; ++i) { - ATerm d1, d2; - if (!matchFormal(*i, name, d1, d2)) abort(); + ATerm d1; + if (!matchFormal(*i, name, d1)) abort(); defs2.set(name, (ATerm) ATempty); } for (ATermIterator i(formals); i; ++i) { - ATerm valids, deflt; + ATerm deflt; set<Expr> done2; - if (!matchFormal(*i, name, valids, deflt)) abort(); - checkVarDefs2(done, defs, valids); + if (!matchFormal(*i, name, deflt)) abort(); checkVarDefs2(done2, defs2, deflt); } set<Expr> done2; |