public override void Visit(ILeftShift leftShift) { if (Process(leftShift)) { visitor.Visit(leftShift); } base.Visit(leftShift); }
public void Visit(ILeftShift leftShift) { Contract.Requires(leftShift != null); throw new NotImplementedException(); }
public void Visit(ILeftShift leftShift) { this.traverser.Traverse(leftShift); }
/// <summary> /// Traverses the left shift expression. /// </summary> public void Traverse(ILeftShift leftShift) { Contract.Requires(leftShift != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(leftShift); if (this.StopTraversal) return; this.TraverseChildren(leftShift); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(leftShift); }
//^ ensures this.path.Count == old(this.path.Count); /// <summary> /// Traverses the given left shift expression. /// </summary> /// <param name="leftShift"></param> public virtual void Visit(ILeftShift leftShift) { if (this.stopTraversal) return; //^ int oldCount = this.path.Count; this.path.Push(leftShift); this.Visit(leftShift.LeftOperand); this.Visit(leftShift.RightOperand); //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not to decrease this.path.Count. this.path.Pop(); }
public virtual void onASTElement(ILeftShift leftShift) { }
public void Visit(ILeftShift leftShift) { this.result = this.copier.Copy(leftShift); }
/// <summary> /// Visits the specified left shift. /// </summary> /// <param name="leftShift">The left shift.</param> public override void Visit(ILeftShift leftShift) { LeftShift mutableLeftShift = leftShift as LeftShift; if (alwaysMakeACopy || mutableLeftShift == null) mutableLeftShift = new LeftShift(leftShift); this.resultExpression = this.myCodeMutator.Visit(mutableLeftShift); }
/// <summary> /// Generates IL for the specified left shift. /// </summary> /// <param name="leftShift">The left shift.</param> public override void TraverseChildren(ILeftShift leftShift) { this.Traverse(leftShift.LeftOperand); this.Traverse(leftShift.RightOperand); this.generator.Emit(OperationCode.Shl); this.StackSize--; }
public override IExpression Rewrite(ILeftShift operation) { return(ReplaceOperation(operation)); }
public override void Visit(ILeftShift operation) { ProcessOperation(operation); }
public override void Visit(ILeftShift leftShift) { if(Process(leftShift)){visitor.Visit(leftShift);} base.Visit(leftShift); }
public void Visit(ILeftShift leftShift) { this.result = this.rewriter.Rewrite(leftShift); }
/// <summary> /// Rewrites the given left shift expression. /// </summary> /// <param name="leftShift"></param> public virtual IExpression Rewrite(ILeftShift leftShift) { var mutableLeftShift = leftShift as LeftShift; if (mutableLeftShift == null) return leftShift; this.RewriteChildren(mutableLeftShift); return mutableLeftShift; }
/// <summary> /// /// </summary> /// <param name="leftShift"></param> public LeftShift(ILeftShift leftShift) : base(leftShift) { }
public override void TraverseChildren(ILeftShift leftShift) { base.TraverseChildren(leftShift); ((LeftShift)leftShift).Type = leftShift.LeftOperand.Type; }
/// <summary> /// Returns a shallow copy of the given left shift expression. /// </summary> /// <param name="leftShift"></param> public LeftShift Copy(ILeftShift leftShift) { return new LeftShift(leftShift); }
public override void Visit(ILeftShift leftShift) { allElements.Add(new InvokInfo(Traverser, "ILeftShift", leftShift)); }
public override void TraverseChildren(ILeftShift leftShift) { var targetExpression = leftShift.LeftOperand as ITargetExpression; if (targetExpression != null) { // x <<= e bool statement = this.currentExpressionIsOpAssignStatement; this.currentExpressionIsOpAssignStatement = false; this.VisitAssignment(targetExpression, leftShift, (IExpression e) => this.TraverseLeftShiftRightOperandAndDoOperation(e), treatAsStatement: statement, pushTargetRValue: true, resultIsInitialTargetRValue: leftShift.ResultIsUnmodifiedLeftOperand); } else { // x << e this.Traverse(leftShift.LeftOperand); this.TraverseLeftShiftRightOperandAndDoOperation(leftShift); } }
/// <summary> /// Rewrites the given left shift expression. /// </summary> /// <param name="leftShift"></param> public virtual IExpression Rewrite(ILeftShift leftShift) { return leftShift; }
public override void TraverseChildren(ILeftShift leftShift) { MethodEnter(leftShift); base.TraverseChildren(leftShift); MethodExit(); }
/// <summary> /// Performs some computation with the given left shift expression. /// </summary> /// <param name="leftShift"></param> public virtual void Visit(ILeftShift leftShift) { }
/// <summary> /// Returns a deep copy of the given left shift expression. /// </summary> /// <param name="leftShift"></param> public LeftShift Copy(ILeftShift leftShift) { Contract.Requires(leftShift != null); Contract.Ensures(Contract.Result<LeftShift>() != null); var mutableCopy = this.shallowCopier.Copy(leftShift); this.CopyChildren((BinaryOperation)mutableCopy); return mutableCopy; }
/// <summary> /// Traverses the children of the left shift expression. /// </summary> public virtual void TraverseChildren(ILeftShift leftShift) { Contract.Requires(leftShift != null); this.TraverseChildren((IBinaryOperation)leftShift); }
/// <summary> /// Returns a shallow copy of the given left shift expression. /// </summary> /// <param name="leftShift"></param> public LeftShift Copy(ILeftShift leftShift) { Contract.Requires(leftShift != null); Contract.Ensures(Contract.Result<LeftShift>() != null); return new LeftShift(leftShift); }
/// <summary> /// Performs some computation with the given left shift expression. /// </summary> /// <param name="leftShift"></param> public virtual void Visit(ILeftShift leftShift) { this.Visit((IBinaryOperation)leftShift); }
public void Visit(ILeftShift leftShift) { throw new NotImplementedException(); }
/// <summary> /// Visits the specified left shift. /// </summary> /// <param name="leftShift">The left shift.</param> public override void Visit(ILeftShift leftShift) { LeftShift mutableLeftShift = new LeftShift(leftShift); this.resultExpression = this.myCodeCopier.DeepCopy(mutableLeftShift); }
public override void TraverseChildren(ILeftShift leftShift) { var needsParen = LowerPrecedenceThanParentExpression(leftShift); var savedCurrentPrecedence = this.currentPrecedence; this.currentPrecedence = this.Precedence(leftShift); if (needsParen) this.sourceEmitterOutput.Write("("); this.Traverse(leftShift.LeftOperand); if (leftShift.LeftOperand is ITargetExpression) this.sourceEmitterOutput.Write(" <<= "); else this.sourceEmitterOutput.Write(" << "); this.Traverse(leftShift.RightOperand); if (needsParen) this.sourceEmitterOutput.Write(")"); this.currentPrecedence = savedCurrentPrecedence; }
/// <summary> /// Returns a deep copy of the given left shift expression. /// </summary> /// <param name="leftShift"></param> public LeftShift Copy(ILeftShift leftShift) { var mutableCopy = this.shallowCopier.Copy(leftShift); this.CopyChildren((BinaryOperation)mutableCopy); return mutableCopy; }
/// <summary> /// Visits the specified left shift. /// </summary> /// <param name="leftShift">The left shift.</param> public override void Visit(ILeftShift leftShift) { LeftShift mutableLeftShift = leftShift as LeftShift; if (mutableLeftShift == null) { this.resultExpression = leftShift; return; } this.resultExpression = this.myCodeMutator.Visit(mutableLeftShift); }