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  unittest                                                                             395  unittest
  396  {                                                                                    396  {
  397          auto e = new Evaluator;                                                      397          auto e = new Evaluator;
  398          enrollRuntimeLibrary(e);                                                     398          enrollRuntimeLibrary(e);
  399          assert_eq( e.evalString(`                                                    399          assert_eq( e.evalString(`
  400  @@3(x){x};                                                                           400  @@3(x){x};
  401  def incr(x) { x+1 };                                                                 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  def fb(n @value @3) { @3(n) };                                                       403  def fb(n @value @3) { @3(n) };
  404  fb(incr(incr(incr(0))))                                                              404  fb(incr(incr(incr(0))))
  405          `), new IntValue(BigInt(0)) );                                               405          `), new IntValue(BigInt(0)) );
  406  }                                                                                    406  }
  407                                                                                       407  
  408  unittest                                                                             408  unittest
  409  {                                                                                    409  {