1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

* Refactoring to support domain checks.

This commit is contained in:
Eelco Dolstra 2006-07-24 15:16:03 +00:00
parent 9c3099d328
commit 57751fdb55
10 changed files with 36 additions and 29 deletions

View file

@ -16,6 +16,8 @@
#include "lexer-tab.h"
typedef ATerm Expr;
typedef ATerm ValidValues;
typedef ATerm DefaultValue;
typedef ATerm Pos;
#include "nixexpr-ast.hh"
@ -203,8 +205,9 @@ formals
;
formal
: ID { $$ = makeNoDefFormal($1); }
| ID '?' expr { $$ = makeDefFormal($1, $3); }
: ID { $$ = makeFormal($1, makeUnrestrictedValues(), makeNoDefaultValue()); }
// | ID ':' '[' expr_list ']' { $$ = makeDefFormal($1, $3); }
| ID '?' expr { $$ = makeFormal($1, makeUnrestrictedValues(), makeDefaultValue($3)); }
;
%%