public override void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { this.PrintToken(VBToken.Indent); this.PrintToken(VBToken.YieldBreak); this.PrintToken(VBToken.Semicolon); this.PrintToken(VBToken.NewLine); }
public override void Visit(IYieldBreakStatement yieldBreakStatement) { if (Process(yieldBreakStatement)) { visitor.Visit(yieldBreakStatement); } base.Visit(yieldBreakStatement); }
public override bool Visit(IYieldBreakStatement statement, IStatement context) { _stack.Push(statement); try { return(base.Visit(statement, context)); } finally { _stack.Pop(); } }
public override void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { MethodEnter(yieldBreakStatement); base.TraverseChildren(yieldBreakStatement); MethodExit(); }
public abstract void TranslateStatement(IYieldBreakStatement breakStatement);
/// <summary> /// Returns a shallow copy of the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public YieldBreakStatement Copy(IYieldBreakStatement yieldBreakStatement) { return new YieldBreakStatement(yieldBreakStatement); }
/// <summary> /// Visits the specified yield break statement. /// </summary> /// <param name="yieldBreakStatement">The yield break statement.</param> public override void Visit(IYieldBreakStatement yieldBreakStatement) { YieldBreakStatement mutableYieldBreakStatement = yieldBreakStatement as YieldBreakStatement; if (alwaysMakeACopy || mutableYieldBreakStatement == null) mutableYieldBreakStatement = new YieldBreakStatement(yieldBreakStatement); this.resultStatement = this.myCodeMutator.Visit(mutableYieldBreakStatement); }
/// <summary> /// Performs some computation with the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public virtual void Visit(IYieldBreakStatement yieldBreakStatement) { this.Visit((IStatement)yieldBreakStatement); }
public override void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { this.foundYield = true; base.TraverseChildren(yieldBreakStatement); }
/// <summary> /// Replace a yield break with: /// { /// this.state = -2; /// return; /// } /// </summary> /// <param name="yieldBreakStatement"></param> /// <returns></returns> public override IStatement Rewrite(IYieldBreakStatement yieldBreakStatement) { BlockStatement blockStatement = new BlockStatement(); ExpressionStatement thisDotStateEqMinus2 = new ExpressionStatement() { Expression = new Assignment() { Source = new CompileTimeConstant() { Value = -2, Type = this.host.PlatformType.SystemInt32 }, Target = new TargetExpression() { Definition = iteratorClosure.StateFieldReference, Type = this.host.PlatformType.SystemInt32, Instance = new ThisReference() }, Type = this.host.PlatformType.SystemInt32, } }; blockStatement.Statements.Add(thisDotStateEqMinus2); ReturnStatement returnFalse = new ReturnStatement() { Expression = new CompileTimeConstant() { Value = false, Type = this.host.PlatformType.SystemBoolean } }; blockStatement.Statements.Add(returnFalse); return blockStatement; }
public override void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { this.foundYield = true; if (this.foundAnonymousDelegate) this.StopTraversal = true; else base.TraverseChildren(yieldBreakStatement); }
public override void Visit(IYieldBreakStatement yieldBreakStatement) { if(Process(yieldBreakStatement)){visitor.Visit(yieldBreakStatement);} base.Visit(yieldBreakStatement); }
public TransformationKind Visit(IYieldBreakStatement statement, ITransformationContext context) { throw new NotImplementedException(); }
public void Visit(IYieldBreakStatement yieldBreakStatement) { this.result = this.rewriter.Rewrite(yieldBreakStatement); }
/// <summary> /// Rewrites the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public virtual IStatement Rewrite(IYieldBreakStatement yieldBreakStatement) { var mutableYieldBreakStatement = yieldBreakStatement as YieldBreakStatement; if (mutableYieldBreakStatement == null) return yieldBreakStatement; this.RewriteChildren(mutableYieldBreakStatement); return mutableYieldBreakStatement; }
/// <summary> /// Performs some computation with the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public virtual void Visit(IYieldBreakStatement yieldBreakStatement) { }
/// <summary> /// Traverses the children of the yield break statement. /// </summary> public virtual void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { Contract.Requires(yieldBreakStatement != null); this.TraverseChildren((IStatement)yieldBreakStatement); }
public abstract void Translate(IYieldBreakStatement statement);
public void Visit(IYieldBreakStatement yieldBreakStatement) { throw new NotImplementedException(); }
/// <summary> /// Generates IL for the specified yield break statement. /// </summary> /// <param name="yieldBreakStatement">The yield break statement.</param> public override void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { Contract.Assume(false, "IYieldBreakStatement nodes must be replaced before trying to convert the Code Model to IL."); }
public virtual void onASTElement(IYieldBreakStatement yieldBreakStatement) { }
public override void Visit(IYieldBreakStatement yieldBreakStatement) { allElements.Add(new InvokInfo(Traverser, "IYieldBreakStatement", yieldBreakStatement)); }
/// <summary> /// Returns a deep copy of the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public YieldBreakStatement Copy(IYieldBreakStatement yieldBreakStatement) { var mutableCopy = this.shallowCopier.Copy(yieldBreakStatement); return mutableCopy; }
public bool Visit(IYieldBreakStatement statement, TContext context) { return(false); }
public void Visit(IYieldBreakStatement yieldBreakStatement) { this.result = this.copier.Copy(yieldBreakStatement); }
public abstract TransformationImpact CalculateRefactorImpact(IYieldBreakStatement statement);
TransformationImpact IStatementVisitor <TransformationImpact> .Visit(IYieldBreakStatement statement) { return(CalculateRefactorImpact(statement)); }
/// <summary> /// Rewrites the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public virtual IStatement Rewrite(IYieldBreakStatement yieldBreakStatement) { return yieldBreakStatement; }
public override void TranslateStatement(IYieldBreakStatement breakStatement) { throw new NotImplementedException(); }
void IStatementVisitor.Visit(IYieldBreakStatement statement) { this.Translate(statement); }
/// <summary> /// Returns a shallow copy of the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public YieldBreakStatement Copy(IYieldBreakStatement yieldBreakStatement) { Contract.Requires(yieldBreakStatement != null); Contract.Ensures(Contract.Result<YieldBreakStatement>() != null); return new YieldBreakStatement(yieldBreakStatement); }
/// <summary> /// Traverses the yield break statement. /// </summary> public void Traverse(IYieldBreakStatement yieldBreakStatement) { Contract.Requires(yieldBreakStatement != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(yieldBreakStatement); if (this.StopTraversal) return; this.TraverseChildren(yieldBreakStatement); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(yieldBreakStatement); }
/// <summary> /// Returns a deep copy of the given yield break statement. /// </summary> /// <param name="yieldBreakStatement"></param> public YieldBreakStatement Copy(IYieldBreakStatement yieldBreakStatement) { Contract.Requires(yieldBreakStatement != null); Contract.Ensures(Contract.Result<YieldBreakStatement>() != null); var mutableCopy = this.shallowCopier.Copy(yieldBreakStatement); return mutableCopy; }
public void Visit(IYieldBreakStatement yieldBreakStatement) { this.traverser.Traverse(yieldBreakStatement); }
public void Visit(IYieldBreakStatement yieldBreakStatement) { Contract.Requires(yieldBreakStatement != null); throw new NotImplementedException(); }
public abstract IStatement Transform(IYieldBreakStatement statement);
public override void TraverseChildren(IYieldBreakStatement yieldBreakStatement) { this.PrintToken(CSharpToken.Indent); this.PrintToken(CSharpToken.YieldBreak); this.PrintToken(CSharpToken.Semicolon); this.PrintToken(CSharpToken.NewLine); }
/// <summary> /// /// </summary> /// <param name="yieldBreakStatement"></param> public YieldBreakStatement(IYieldBreakStatement yieldBreakStatement) : base(yieldBreakStatement) { }
/// <summary> /// Visits the specified yield break statement. /// </summary> /// <param name="yieldBreakStatement">The yield break statement.</param> public override void Visit(IYieldBreakStatement yieldBreakStatement) { YieldBreakStatement mutableYieldBreakStatement = new YieldBreakStatement(yieldBreakStatement); this.resultStatement = this.myCodeCopier.DeepCopy(mutableYieldBreakStatement); }
/// <summary> /// Visits the specified yield break statement. /// </summary> /// <param name="yieldBreakStatement">The yield break statement.</param> public override void Visit(IYieldBreakStatement yieldBreakStatement) { YieldBreakStatement mutableYieldBreakStatement = yieldBreakStatement as YieldBreakStatement; if (mutableYieldBreakStatement == null) { this.resultStatement = yieldBreakStatement; return; } this.resultStatement = this.myCodeMutator.Visit(mutableYieldBreakStatement); }