Example #1
0
 public IfStatementBuilder ElseIf(SourceSpan span, Expression test, SourceLocation bodyLocation, Statement body)
 {
     Contract.RequiresNotNull(test, "test");
     Contract.Requires(test.Type == typeof(bool), "test");
     Contract.RequiresNotNull(body, "body");
     _clauses.Add(Ast.IfCondition(span, bodyLocation, test, body));
     return(this);
 }
Example #2
0
 public static IfStatement IfThenElse(SourceSpan span, Expression test, Statement body, Statement @else)
 {
     return(If(
                span,
                new IfStatementTest[] {
         Ast.IfCondition(SourceSpan.None, SourceLocation.None, test, body)
     },
                @else
                ));
 }