1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

* Conditions, string equality.

This commit is contained in:
Eelco Dolstra 2003-11-01 19:15:08 +00:00
parent 1b4184ccbb
commit 1610444671
2 changed files with 24 additions and 6 deletions

View file

@ -32,12 +32,6 @@ static Expr evalExpr2(EvalState & state, Expr e)
{
/* Conditional. */
if (ATmatch(e, "If(<term>, <term>, <term>)", &e1, &e2, &e3)) {
e1 = evalExpr(state, e1);
Expr x;
if (ATmatch(e1, "True")) x = e2;
else if (ATmatch(e1, "False")) x = e3;
else throw badTerm("expecting a boolean", e1);
return evalExpr(state, x);
}
/* Ad-hoc function for string matching. */