Example #1
0
 public IfStatement(
     IBaseExpression condition,
     IBaseStatement ifBranch,
     IBaseStatement elseBranch = null
     )
 {
     IBaseExpression.CheckTypes(
         "if condition", "",
         typeof(bool), condition.GetResultType()
         );
     this.condition  = condition;
     precalc         = (bool?)condition.Evaluate();
     this.ifBranch   = ifBranch;
     this.elseBranch = elseBranch;
 }