/// <summary> /// Visits the specified do until statement. /// </summary> /// <param name="doUntilStatement">The do until statement.</param> /// <returns></returns> protected virtual IStatement DeepCopy(DoUntilStatement doUntilStatement) { doUntilStatement.Body = Substitute(doUntilStatement.Body); doUntilStatement.Condition = Substitute(doUntilStatement.Condition); return doUntilStatement; }
/// <summary> /// Visits the specified do until statement. /// </summary> /// <param name="doUntilStatement">The do until statement.</param> public override void Visit(IDoUntilStatement doUntilStatement) { DoUntilStatement mutableDoUntilStatement = new DoUntilStatement(doUntilStatement); this.resultStatement = this.myCodeCopier.DeepCopy(mutableDoUntilStatement); }
/// <summary> /// Visits the specified do until statement. /// </summary> /// <param name="doUntilStatement">The do until statement.</param> /// <returns></returns> public virtual IStatement Visit(DoUntilStatement doUntilStatement) { doUntilStatement.Body = Visit(doUntilStatement.Body); doUntilStatement.Condition = Visit(doUntilStatement.Condition); return doUntilStatement; }
/// <summary> /// Rewrites the children of the given do until statement. /// </summary> public virtual void RewriteChildren(DoUntilStatement doUntilStatement) { this.RewriteChildren((Statement)doUntilStatement); doUntilStatement.Body = this.Rewrite(doUntilStatement.Body); doUntilStatement.Condition = this.Rewrite(doUntilStatement.Condition); }
/// <summary> /// Visits the specified do until statement. /// </summary> /// <param name="doUntilStatement">The do until statement.</param> public override void Visit(IDoUntilStatement doUntilStatement) { DoUntilStatement mutableDoUntilStatement = doUntilStatement as DoUntilStatement; if (alwaysMakeACopy || mutableDoUntilStatement == null) mutableDoUntilStatement = new DoUntilStatement(doUntilStatement); this.resultStatement = this.myCodeMutator.Visit(mutableDoUntilStatement); }