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:
parent
9c3099d328
commit
57751fdb55
10 changed files with 36 additions and 29 deletions
|
@ -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)); }
|
||||
;
|
||||
|
||||
%%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue