public static DoWhileStatementAst Update( this DoWhileStatementAst ast, string label = null, PipelineBaseAst condition = null, IEnumerable <StatementAst> statements = null) { return(new DoWhileStatementAst( ast.Extent, label ?? ast.Label, condition?.Clone() ?? ast.Condition.Clone(), ast.Body.Update(statements))); }
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())); }
public static ForStatementAst Update( this ForStatementAst ast, PipelineBaseAst initializer = null, PipelineBaseAst condition = null, PipelineBaseAst iterator = null, IEnumerable <StatementAst> statements = null, string label = null) { return(new ForStatementAst( ast.Extent, label ?? ast.Label, initializer?.Clone() ?? ast.Initializer.Clone(), condition?.Clone() ?? ast.Condition.Clone(), iterator?.Clone() ?? ast.Iterator?.Clone(), ast.Body.Update(statements))); }
public static ForEachStatementAst Update( this ForEachStatementAst ast, VariableExpressionAst variable = null, PipelineBaseAst expression = null, IEnumerable <StatementAst> statements = null, string label = null, ForEachFlags?flags = null) { return(new ForEachStatementAst( ast.Extent, label ?? ast.Label, flags ?? ast.Flags, variable?.Clone() ?? ast.Variable.Clone(), expression?.Clone() ?? ast.Condition.Clone(), ast.Body.Update(statements))); }
public static ThrowStatementAst Update(this ThrowStatementAst ast, PipelineBaseAst pipeline = null) { return(new ThrowStatementAst(ast.Extent, pipeline?.Clone() ?? ast.Pipeline?.Clone())); }
public static ParenExpressionAst Update(this ParenExpressionAst ast, PipelineBaseAst pipeline = null) { return(new ParenExpressionAst(ast.Extent, pipeline?.Clone() ?? ast.Pipeline?.Clone())); }