public static ConvertExpressionAst Update(
     this ConvertExpressionAst ast,
     TypeConstraintAst typeConstraint = null,
     ExpressionAst child = null)
 {
     return(new ConvertExpressionAst(
                ast.Extent,
                typeConstraint?.Clone() ?? ast.Type.Clone(),
                child?.Clone() ?? ast.Child.Clone()));
 }
 public static AttributedExpressionAst Update(
     this AttributedExpressionAst ast,
     AttributeBaseAst attribute = null,
     ExpressionAst child        = null)
 {
     return(new AttributedExpressionAst(
                ast.Extent,
                attribute?.Clone() ?? ast.Attribute.Clone(),
                child?.Clone() ?? ast.Child.Clone()));
 }
 public static UnaryExpressionAst Update(
     this UnaryExpressionAst ast,
     TokenKind?tokenKind = null,
     ExpressionAst child = null)
 {
     return(new UnaryExpressionAst(
                ast.Extent,
                tokenKind ?? ast.TokenKind,
                child?.Clone() ?? ast.Child?.Clone()));
 }
 public static IndexExpressionAst Update(
     this IndexExpressionAst ast,
     ExpressionAst target = null,
     ExpressionAst index  = null)
 {
     return(new IndexExpressionAst(
                ast.Extent,
                target?.Clone() ?? ast.Target.Clone(),
                index?.Clone() ?? ast.Index.Clone()));
 }
 public static CommandExpressionAst Update(
     this CommandExpressionAst ast,
     ExpressionAst expression = null,
     IEnumerable <RedirectionAst> redirections = null)
 {
     return(new CommandExpressionAst(
                ast.Extent,
                expression?.Clone() ?? ast.Expression,
                redirections?.CloneAll() ?? ast.Redirections.CloneAll()));
 }
 public static CommandParameterAst Update(
     this CommandParameterAst ast,
     string parameterName   = null,
     ExpressionAst argument = null)
 {
     return(new CommandParameterAst(
                ast.Extent,
                parameterName ?? ast.ParameterName,
                argument?.Clone() ?? ast.Argument?.Clone(),
                ast.ErrorPosition));
 }
 public static ParameterAst Update(
     this ParameterAst ast,
     VariableExpressionAst name            = null,
     IEnumerable <AttributeAst> attributes = null,
     ExpressionAst defaultValue            = null)
 {
     return(new ParameterAst(
                ast.Extent,
                name?.Clone() ?? ast.Name.Clone(),
                attributes?.CloneAll() ?? ast.Attributes?.CloneAll(),
                defaultValue?.Clone() ?? ast.DefaultValue?.Clone()));
 }
 public static NamedAttributeArgumentAst Update(
     NamedAttributeArgumentAst ast,
     string argumentName    = null,
     ExpressionAst argument = null,
     bool?expressionOmitted = null)
 {
     return(new NamedAttributeArgumentAst(
                ast.Extent,
                argumentName ?? ast.ArgumentName,
                argument?.Clone() ?? ast.Argument?.Clone(),
                expressionOmitted ?? ast.ExpressionOmitted));
 }
 public static MemberExpressionAst Update(
     this MemberExpressionAst ast,
     ExpressionAst expression = null,
     CommandElementAst member = null,
     bool? @static            = null)
 {
     return(new MemberExpressionAst(
                ast.Extent,
                expression?.Clone() ?? ast.Expression.Clone(),
                member?.Clone() ?? ast.Member.Clone(),
                @static ?? ast.Static));
 }
 public static FileRedirectionAst Update(
     this FileRedirectionAst ast,
     RedirectionStream?stream = null,
     ExpressionAst file       = null,
     bool?append = null)
 {
     return(new FileRedirectionAst(
                ast.Extent,
                stream ?? ast.FromStream,
                file?.Clone() ?? ast.Location.Clone(),
                append ?? ast.Append));
 }
 public static AssignmentStatementAst Update(
     this AssignmentStatementAst ast,
     ExpressionAst left   = null,
     TokenKind? @operator = null,
     StatementAst right   = null)
 {
     return(new AssignmentStatementAst(
                ast.Extent,
                left?.Clone() ?? ast.Left.Clone(),
                @operator ?? ast.Operator,
                right?.Clone() ?? ast.Right.Clone(),
                ast.ErrorPosition));
 }
 public static InvokeMemberExpressionAst Update(
     this InvokeMemberExpressionAst ast,
     ExpressionAst expression = null,
     CommandElementAst method = null,
     IEnumerable <ExpressionAst> arguments = null,
     bool? @static = null)
 {
     return(new InvokeMemberExpressionAst(
                ast.Extent,
                expression?.Clone() ?? ast.Expression.Clone(),
                method?.Clone() ?? ast.Member.Clone(),
                arguments?.CloneAll() ?? ast.Arguments.CloneAll(),
                @static ?? ast.Static));
 }
 public static UsingExpressionAst Update(this UsingExpressionAst ast, ExpressionAst expressionAst = null)
 {
     return(new UsingExpressionAst(
                ast.Extent,
                expressionAst?.Clone() ?? ast.SubExpression?.Clone()));
 }
 public static ContinueStatementAst Update(this ContinueStatementAst ast, ExpressionAst label = null)
 {
     return(new ContinueStatementAst(ast.Extent, label?.Clone() ?? ast.Label?.Clone()));
 }
 public static BreakStatementAst Update(this BreakStatementAst ast, ExpressionAst label = null)
 {
     return(new BreakStatementAst(ast.Extent, label?.Clone() ?? ast.Label?.Clone()));
 }