mirror of
https://github.com/NixOS/nix
synced 2025-06-30 19:57:59 +02:00
* Shorter list syntax ([a b c] instead of [a, b, c]).
This commit is contained in:
parent
ad0976f8d5
commit
e2655aa332
3 changed files with 15 additions and 8 deletions
|
@ -56,6 +56,13 @@ struct Cleanup : TermFun
|
|||
if (ATmatch(e, "Bool(\"false\")", &s))
|
||||
return ATmake("Bool(False)");
|
||||
|
||||
if (ATmatch(e, "ExprNil"))
|
||||
return (ATerm) ATempty;
|
||||
|
||||
ATerm e1, e2;
|
||||
if (ATmatch(e, "ExprCons(<term>, [<list>])", &e1, &e2))
|
||||
return (ATerm) ATinsert((ATermList) e2, e1);
|
||||
|
||||
return e;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue