public override void Visit(IDoUntilStatement doUntilStatement) { if (Process(doUntilStatement)) { visitor.Visit(doUntilStatement); } base.Visit(doUntilStatement); }
public override void TraverseChildren(IDoUntilStatement doUntilStatement) { base.TraverseChildren(doUntilStatement); }
public void Visit(IDoUntilStatement doUntilStatement) { Contract.Requires(doUntilStatement != null); throw new NotImplementedException(); }
public void Visit(IDoUntilStatement doUntilStatement) { this.traverser.Traverse(doUntilStatement); }
/// <summary> /// Traverses the do until statement. /// </summary> public void Traverse(IDoUntilStatement doUntilStatement) { Contract.Requires(doUntilStatement != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(doUntilStatement); if (this.StopTraversal) return; this.TraverseChildren(doUntilStatement); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(doUntilStatement); }
//^ ensures this.path.Count == old(this.path.Count); /// <summary> /// Traverses the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public virtual void Visit(IDoUntilStatement doUntilStatement) { if (this.stopTraversal) return; //^ int oldCount = this.path.Count; this.path.Push(doUntilStatement); this.Visit(doUntilStatement.Body); this.Visit(doUntilStatement.Condition); //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not decrease this.path.Count. this.path.Pop(); }
public virtual void onASTElement(IDoUntilStatement doUntilStatement) { }
/// <summary> /// Returns a shallow copy of the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public DoUntilStatement Copy(IDoUntilStatement doUntilStatement) { return new DoUntilStatement(doUntilStatement); }
public override void Visit(IDoUntilStatement doUntilStatement) { allElements.Add(new InvokInfo(Traverser, "IDoUntilStatement", doUntilStatement)); }
/// <summary> /// Generates IL for the specified do until statement. /// </summary> /// <param name="doUntilStatement">The do until statement.</param> public override void TraverseChildren(IDoUntilStatement doUntilStatement) { ILGeneratorLabel savedCurrentBreakTarget = this.currentBreakTarget; ILGeneratorLabel savedCurrentContinueTarget = this.currentContinueTarget; this.currentBreakTarget = new ILGeneratorLabel(); this.currentContinueTarget = new ILGeneratorLabel(); if (this.currentTryCatch != null) { this.mostNestedTryCatchFor.Add(this.currentBreakTarget, this.currentTryCatch); this.mostNestedTryCatchFor.Add(this.currentContinueTarget, this.currentTryCatch); } this.generator.MarkLabel(this.currentContinueTarget); this.Traverse(doUntilStatement.Body); this.EmitSequencePoint(doUntilStatement.Condition.Locations); this.VisitBranchIfFalse(doUntilStatement.Condition, this.currentContinueTarget); this.generator.MarkLabel(this.currentBreakTarget); this.currentBreakTarget = savedCurrentBreakTarget; this.currentContinueTarget = savedCurrentContinueTarget; this.lastStatementWasUnconditionalTransfer = false; }
public override void Visit(IDoUntilStatement doUntilStatement) { if(Process(doUntilStatement)){visitor.Visit(doUntilStatement);} base.Visit(doUntilStatement); }
public override void TraverseChildren(IDoUntilStatement doUntilStatement) { throw new TranslationException("DoUntil statements are not handled"); }
public void Visit(IDoUntilStatement doUntilStatement) { this.result = this.rewriter.Rewrite(doUntilStatement); }
/// <summary> /// Rewrites the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public virtual IStatement Rewrite(IDoUntilStatement doUntilStatement) { var mutableDoUntilStatement = doUntilStatement as DoUntilStatement; if (mutableDoUntilStatement == null) return doUntilStatement; this.RewriteChildren(mutableDoUntilStatement); return mutableDoUntilStatement; }
/// <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); }
/// <summary> /// Rewrites the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public virtual IStatement Rewrite(IDoUntilStatement doUntilStatement) { return doUntilStatement; }
public void Visit(IDoUntilStatement doUntilStatement) { this.result = this.copier.Copy(doUntilStatement); }
public override void TraverseChildren(IDoUntilStatement doUntilStatement) { MethodEnter(doUntilStatement); base.TraverseChildren(doUntilStatement); MethodExit(); }
/// <summary> /// Returns a deep copy of the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public DoUntilStatement Copy(IDoUntilStatement doUntilStatement) { Contract.Requires(doUntilStatement != null); Contract.Ensures(Contract.Result<DoUntilStatement>() != null); var mutableCopy = this.shallowCopier.Copy(doUntilStatement); mutableCopy.Body = this.Copy(mutableCopy.Body); mutableCopy.Condition = this.Copy(mutableCopy.Condition); return mutableCopy; }
/// <summary> /// Performs some computation with the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public virtual void Visit(IDoUntilStatement doUntilStatement) { }
/// <summary> /// Returns a shallow copy of the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public DoUntilStatement Copy(IDoUntilStatement doUntilStatement) { Contract.Requires(doUntilStatement != null); Contract.Ensures(Contract.Result<DoUntilStatement>() != null); return new DoUntilStatement(doUntilStatement); }
/// <summary> /// Traverses the children of the do until statement. /// </summary> public virtual void TraverseChildren(IDoUntilStatement doUntilStatement) { Contract.Requires(doUntilStatement != null); this.TraverseChildren((IStatement)doUntilStatement); if (this.StopTraversal) return; this.Traverse(doUntilStatement.Body); if (this.StopTraversal) return; this.Traverse(doUntilStatement.Condition); }
/// <summary> /// Performs some computation with the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public virtual void Visit(IDoUntilStatement doUntilStatement) { this.Visit((IStatement)doUntilStatement); }
public void Visit(IDoUntilStatement doUntilStatement) { throw new NotImplementedException(); }
/// <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> /// /// </summary> /// <param name="doUntilStatement"></param> public DoUntilStatement(IDoUntilStatement doUntilStatement) : base(doUntilStatement) { this.body = doUntilStatement.Body; this.condition = doUntilStatement.Condition; }
/// <summary> /// Returns a deep copy of the given do until statement. /// </summary> /// <param name="doUntilStatement"></param> public DoUntilStatement Copy(IDoUntilStatement doUntilStatement) { var mutableCopy = this.shallowCopier.Copy(doUntilStatement); mutableCopy.Body = this.Copy(mutableCopy.Body); mutableCopy.Condition = this.Copy(mutableCopy.Condition); return mutableCopy; }
/// <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 (mutableDoUntilStatement == null) { this.resultStatement = doUntilStatement; return; } this.resultStatement = this.myCodeMutator.Visit(mutableDoUntilStatement); }