1
0
Fork 0
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:
Eelco Dolstra 2003-11-03 11:59:35 +00:00
parent ad0976f8d5
commit e2655aa332
3 changed files with 15 additions and 8 deletions

View file

@ -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;
}
};