about summary refs log tree commit diff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-08-11T13·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-08-11T13·36+0000
commit5664b6d7ba28453ccdd6d1c07a707f98608500ff (patch)
tree60daaa7ce7b53cbfe2ec2a86aeb4eca792ccf7ca /src/libexpr/parser.y
parentb455c4c45cba49397952e662cace85aedb6848fe (diff)
* Removed the "valid values" feature. Nobody uses it anyway.
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index cd3ba88aa658..9c941bb7d446 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -354,9 +354,8 @@ formals
   ;
 
 formal
-  : ID { $$ = makeFormal($1, makeUnrestrictedValues(), makeNoDefaultValue()); }
-  | ID ':' '[' expr_list ']' { $$ = makeFormal($1, makeValidValues($4), makeNoDefaultValue()); }
-  | ID '?' expr { $$ = makeFormal($1, makeUnrestrictedValues(), makeDefaultValue($3)); }
+  : ID { $$ = makeFormal($1, makeNoDefaultValue()); }
+  | ID '?' expr { $$ = makeFormal($1, makeDefaultValue($3)); }
   ;
   
 %%
@@ -396,8 +395,8 @@ static void checkAttrSets(ATerm e)
         ATermMap names(ATgetLength(formals));
         for (ATermIterator i(formals); i; ++i) {
             ATerm name;
-            ATerm d1, d2;
-            if (!matchFormal(*i, name, d1, d2)) abort();
+            ATerm d1;
+            if (!matchFormal(*i, name, d1)) abort();
             if (names.get(name))
                 throw EvalError(format("duplicate formal function argument `%1%' at %2%")
                     % aterm2String(name) % showPos(pos));