Changeset 371

Show
Ignore:
Timestamp:
06/30/08 08:10:46 (5 months ago)
Author:
FeepingCreature
Message:
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/tools/base.d

    r363 r371  
    10571057mixin(Operator!("or", "return OrSet(lhs, rhs); ")); 
    10581058 
     1059template IfBranch(T...) { 
     1060  static if (T.length == 1) const string IfBranch = T[0]; 
     1061  else const string IfBranch = "if ("~T[0]~") { 
     1062"~Replace!(IfBranch!(T[4..$]), T[1], T[2])~" 
     1063} else { 
     1064"~Replace!(IfBranch!(T[4..$]), T[1], T[3])~" 
     1065}"; 
     1066} 
     1067 
    10591068import tools.log: logln; 
    10601069unittest {