about summary refs log tree commit diff
path: root/src/libexpr/parser.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-07-24T15·16+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-07-24T15·16+0000
commit57751fdb55ad04d82542165417511d26304cadc2 (patch)
tree4e31f364095847bfc80b927f23e2a0d23f46e2aa /src/libexpr/parser.cc
parent9c3099d3286b7bc8582b1685ba1917db409cac0c (diff)
* Refactoring to support domain checks.
Diffstat (limited to 'src/libexpr/parser.cc')
-rw-r--r--src/libexpr/parser.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libexpr/parser.cc b/src/libexpr/parser.cc
index 5c2c85cd73af..7adbcb618e8c 100644
--- a/src/libexpr/parser.cc
+++ b/src/libexpr/parser.cc
@@ -118,10 +118,8 @@ static void checkAttrSets(ATerm e)
         ATermMap names(ATgetLength(formals));
         for (ATermIterator i(formals); i; ++i) {
             ATerm name;
-            Expr deflt;
-            if (!matchNoDefFormal(*i, name) &&
-                !matchDefFormal(*i, name, deflt))
-                abort();
+            ATerm d1, d2;
+            if (!matchFormal(*i, name, d1, d2)) abort();
             if (names.get(name))
                 throw EvalError(format("duplicate formal function argument `%1%' at %2%")
                     % aterm2String(name) % showPos(pos));