/// <summary> /// Visits the specified pop value expression. /// </summary> /// <param name="popValue">The pop value expression.</param> /// <returns></returns> protected virtual IExpression DeepCopy(PopValue popValue) { popValue.Type = this.Substitute(popValue.Type); return popValue; }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> public override void Visit(IPopValue popValue) { PopValue mutablePopValue = new PopValue(popValue); this.resultExpression = this.myCodeCopier.DeepCopy(mutablePopValue); }
/// <summary> /// Rewrites the children of the given pop value expression. /// </summary> public virtual void RewriteChildren(PopValue popValue) { this.RewriteChildren((Expression)popValue); }
/// <summary> /// Visits the specified PopValue. /// </summary> /// <param name="popValue">The PopValue.</param> /// <returns></returns> public virtual IExpression Visit(PopValue popValue) { popValue.Type = this.Visit(popValue.Type); return popValue; }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> /// <param name="popValue"></param> public override void Visit(IPopValue popValue) { PopValue mutablePopValue = popValue as PopValue; if (alwaysMakeACopy || mutablePopValue == null) mutablePopValue = new PopValue(popValue); this.resultExpression = this.myCodeMutator.Visit(mutablePopValue); }