public static TryStatementAst Update(
     this TryStatementAst ast,
     StatementBlockAst body = null,
     IEnumerable <CatchClauseAst> catchClauses = null,
     StatementBlockAst @finally = null)
 {
     return(new TryStatementAst(
                ast.Extent,
                body?.Clone() ?? ast.Body?.Clone(),
                catchClauses?.CloneAll() ?? ast.CatchClauses?.CloneAll(),
                @finally?.Clone() ?? ast.Finally?.Clone()));
 }
 public static WhileStatementAst Update(
     this WhileStatementAst ast,
     PipelineBaseAst condition = null,
     StatementBlockAst body    = null,
     string label = null)
 {
     return(new WhileStatementAst(
                ast.Extent,
                label ?? ast.Label,
                condition?.Clone() ?? ast.Condition?.Clone(),
                body?.Clone() ?? ast.Body?.Clone()));
 }
 public static SwitchStatementAst Update(
     this SwitchStatementAst ast,
     string label = null,
     PipelineBaseAst condition = null,
     SwitchFlags?flags         = null,
     IEnumerable <Tuple <ExpressionAst, StatementBlockAst> > clauses = null,
     StatementBlockAst @default = null)
 {
     return(new SwitchStatementAst(
                ast.Extent,
                label ?? ast.Label,
                condition?.Clone() ?? ast.Condition?.Clone(),
                flags ?? ast.Flags,
                clauses?.CloneAll() ?? ast.Clauses?.CloneAll(),
                @default?.Clone() ?? ast.Default?.Clone()));
 }