From f4c5531d928caadee75d66bba40994f55f839be7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 24 Jul 2006 16:35:34 +0000 Subject: * New language feature: domain checks, which check whether a function argument has a valid value, i.e., is in a certain domain. E.g., { foo : [true false] , bar : ["a" "b" "c"] }: ... This previously could be done using assertions, but domain checks will allow the buildfarm to automatically extract the configuration space from functions. --- src/libexpr/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/parser.y') diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index b28aa27601bd..c1e3b48a79a1 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -206,7 +206,7 @@ formals formal : ID { $$ = makeFormal($1, makeUnrestrictedValues(), makeNoDefaultValue()); } -// | ID ':' '[' expr_list ']' { $$ = makeDefFormal($1, $3); } + | ID ':' '[' expr_list ']' { $$ = makeFormal($1, makeValidValues($4), makeNoDefaultValue()); } | ID '?' expr { $$ = makeFormal($1, makeUnrestrictedValues(), makeDefaultValue($3)); } ; -- cgit 1.4.1