Differences From Artifact [4eba423d1304ad73]:
- File
polemy/eval.d
- 2010-11-24 11:20:42 - part of checkin [153a14cec0] on branch trunk - if-then-else without {}s. some cosmetic changes (user: kinaba) [annotate]
To Artifact [bd6a863bd24c7016]:
- File
polemy/eval.d
- 2010-11-24 12:14:00 - part of checkin [3ae09b8cbf] on branch trunk - changed if-then-else syntax (user: kinaba) [annotate]
395 395 unittest
396 396 {
397 397 auto e = new Evaluator;
398 398 enrollRuntimeLibrary(e);
399 399 assert_eq( e.evalString(`
400 400 @@3(x){x};
401 401 def incr(x) { x+1 };
402 -@ 3 incr(x) {@value( if(@ 3(x)+1< 3){@ 3(x)+1}else{0} )};
402 +@ 3 incr(x) {@value( if @ 3(x)+1< 3 then @3(x)+1 else 0 )};
403 403 def fb(n @value @3) { @3(n) };
404 404 fb(incr(incr(incr(0))))
405 405 `), new IntValue(BigInt(0)) );
406 406 }
407 407
408 408 unittest
409 409 {