public override void VisitBreakStatement(IBreakStatement breakStatement) { Value = new Statement() { BreakStatement = new BreakStatementFactory(breakStatement).Value }; }
public override void TranslateStatement(IBreakStatement breakStatement) { foreach (CodeStatement cst in breakStatement.GenerateCodeDom(this.Options)) { this.Provider.GenerateCodeFromStatement(cst, base.Target, this.Options.Options); } }
public override void Visit(IBreakStatement breakStatement) { if (Process(breakStatement)) { visitor.Visit(breakStatement); } base.Visit(breakStatement); }
public override bool Visit(IBreakStatement statement, IStatement context) { _stack.Push(statement); try { return(base.Visit(statement, context)); } finally { _stack.Pop(); } }
public override bool Equals(object obj) { if (this == obj) { return(true); } IBreakStatement statement = obj as IBreakStatement; if (statement == null) { return(false); } return(true); }
protected CognitiveComplexityHintBase(ITreeNode node, DocumentOffset offset, int value) { _node = node; _offset = offset; Value = value; Description = node switch { IWhileStatement _ => "While-Statement (increases nesting)", ISwitchStatement _ => "Switch-Statement (increases nesting)", IDoStatement _ => "Do-While-Statement (increases nesting)", IIfStatement _ => "If-Statement (increases nesting)", IForStatement _ => "For-Statement (increases nesting)", IForeachStatement _ => "Foreach-Statement (increases nesting)", ICatchClause _ => "Catch-Clause (increases nesting)", IGotoStatement _ => "Goto-Statement", IBreakStatement _ => "Break-Statement", IConditionalOrExpression _ => "First/alternating conditional Expression", IConditionalAndExpression _ => "First/alternating conditional Expression", ICSharpStatement _ => "If-Statement (increases nesting)", ICSharpExpression _ => "Recursive Call", _ => throw new NotSupportedException(node.GetType().FullName) }; }
public void Visit(IBreakStatement breakStatement) { this.result = this.copier.Copy(breakStatement); }
public virtual void VisitBreakStatement(IBreakStatement value) { }
/// <summary> /// Visits the specified break statement. /// </summary> /// <param name="breakStatement">The break statement.</param> public override void Visit(IBreakStatement breakStatement) { BreakStatement mutableBreakStatement = breakStatement as BreakStatement; if (mutableBreakStatement == null) { this.resultStatement = breakStatement; return; } this.resultStatement = this.myCodeMutator.Visit(mutableBreakStatement); }
public virtual void VisitBreakStatement(IBreakStatement s) { }
public virtual void Visit(IBreakStatement stmt, TContext context) { }
public void Visit(IBreakStatement breakStatement) { this.traverser.Traverse(breakStatement); }
//^ ensures this.path.Count == old(this.path.Count); /// <summary> /// Traverses the given break statement. /// </summary> /// <param name="breakStatement"></param> public virtual void Visit(IBreakStatement breakStatement) { if (this.stopTraversal) return; //^ int oldCount = this.path.Count; this.path.Push(breakStatement); //^ 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(); }
private void WriteBreakStatement(IBreakStatement statement, IFormatter formatter) { this.WriteStatementSeparator(formatter); formatter.WriteKeyword("break"); formatter.Write(";"); formatter.WriteLine(); }
/// <summary> /// /// </summary> /// <remarks>(mschaef) Not Implemented</remarks> /// <param name="breakStatement"></param> public override void TraverseChildren(IBreakStatement breakStatement) { throw new TranslationException("Break statements are not handled"); //StmtBuilder.Add(new Bpl.BreakCmd(breakStatement.Token(), "I dont know")); }
public TransformationKind Visit(IBreakStatement statement, ITransformationContext context) { throw new NotImplementedException(); }
public override void VisitBreakStatement(IBreakStatement value) { _formatter.WriteKeyword("break"); }
/// <summary> /// Rewrites the given break statement. /// </summary> /// <param name="breakStatement"></param> public virtual IStatement Rewrite(IBreakStatement breakStatement) { var mutableBreakStatement = breakStatement as BreakStatement; if (mutableBreakStatement == null) return breakStatement; this.RewriteChildren(mutableBreakStatement); return mutableBreakStatement; }
public override void Visit(IBreakStatement breakStatement) { if(Process(breakStatement)){visitor.Visit(breakStatement);} base.Visit(breakStatement); }
public override void TraverseChildren(IBreakStatement breakStatement) { MethodEnter(breakStatement); base.TraverseChildren(breakStatement); MethodExit(); }
public override void VisitBreakStatement(IBreakStatement breakStatement) { Steps.Add(new WriteBreakKeyword()); Steps.Add(new WriteSemicolon()); }
/// <summary> /// Traverses the break statement. /// </summary> public void Traverse(IBreakStatement breakStatement) { Contract.Requires(breakStatement != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(breakStatement); if (this.StopTraversal) return; this.TraverseChildren(breakStatement); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(breakStatement); }
public void Visit(IBreakStatement stmt, SSTPrintingContext c) { c.Indentation().Keyword("break").Text(";"); }
public void Visit(IBreakStatement breakStatement) { Contract.Requires(breakStatement != null); throw new NotImplementedException(); }
public abstract void Translate(IBreakStatement statement);
public override void TraverseChildren(IBreakStatement breakStatement) { this.PrintToken(VBToken.Indent); sourceEmitterOutput.WriteLine("break;"); }
public override void TraverseChildren(IBreakStatement breakStatement) { this.PrintToken(CSharpToken.Indent); sourceEmitterOutput.WriteLine("break;"); }
public virtual void onASTElement(IBreakStatement breakStatement) { }
/// <summary> /// Returns a deep copy of the given break statement. /// </summary> /// <param name="breakStatement"></param> public BreakStatement Copy(IBreakStatement breakStatement) { var mutableCopy = this.shallowCopier.Copy(breakStatement); return mutableCopy; }
/// <summary> /// Generates IL for the specified break statement. /// </summary> /// <param name="breakStatement">The break statement.</param> public override void TraverseChildren(IBreakStatement breakStatement) { this.EmitSequencePoint(breakStatement.Locations); if (this.LabelIsOutsideCurrentExceptionBlock(this.currentBreakTarget)) this.generator.Emit(OperationCode.Leave, this.currentBreakTarget); else this.generator.Emit(OperationCode.Br, this.currentBreakTarget); this.lastStatementWasUnconditionalTransfer = true; }
public void Visit(IBreakStatement breakStatement) { this.result = this.rewriter.Rewrite(breakStatement); }
/// <summary> /// Visits the specified break statement. /// </summary> /// <param name="breakStatement">The break statement.</param> public override void Visit(IBreakStatement breakStatement) { BreakStatement mutableBreakStatement = new BreakStatement(breakStatement); this.resultStatement = this.myCodeCopier.DeepCopy(mutableBreakStatement); }
public override void Visit(IBreakStatement breakStatement) { allElements.Add(new InvokInfo(Traverser, "IBreakStatement", breakStatement)); }
/// <summary> /// Returns a shallow copy of the given break statement. /// </summary> /// <param name="breakStatement"></param> public BreakStatement Copy(IBreakStatement breakStatement) { return new BreakStatement(breakStatement); }
public abstract void TranslateStatement(IBreakStatement breakStatement);
public int Visit(IBreakStatement stmt, int context) { return(1); }
/// <summary> /// Visits the specified break statement. /// </summary> /// <param name="breakStatement">The break statement.</param> public override void Visit(IBreakStatement breakStatement) { BreakStatement mutableBreakStatement = breakStatement as BreakStatement; if (alwaysMakeACopy || mutableBreakStatement == null) mutableBreakStatement = new BreakStatement(breakStatement); this.resultStatement = this.myCodeMutator.Visit(mutableBreakStatement); }
TransformationImpact IStatementVisitor <TransformationImpact> .Visit(IBreakStatement statement) { return(CalculateRefactorImpact(statement)); }
public bool Visit(IBreakStatement statement, TContext context) { return(!isHardVisitor); }
public virtual void onASTElement(IBreakStatement breakStatement) { }
public abstract TransformationImpact CalculateRefactorImpact(IBreakStatement statement);
void IStatementVisitor.Visit(IBreakStatement statement) { this.Translate(statement); }
public TestLinkerResult Visit(IBreakStatement statement, ICompilationContext context) { throw new NotImplementedException(); }
/// <summary> /// Performs some computation with the given break statement. /// </summary> /// <param name="breakStatement"></param> public virtual void Visit(IBreakStatement breakStatement) { }
/// <summary> /// Rewrites the given break statement. /// </summary> /// <param name="breakStatement"></param> public virtual IStatement Rewrite(IBreakStatement breakStatement) { return breakStatement; }
/// <summary> /// Traverses the children of the break statement. /// </summary> public virtual void TraverseChildren(IBreakStatement breakStatement) { Contract.Requires(breakStatement != null); this.TraverseChildren((IStatement)breakStatement); }
/// <summary> /// /// </summary> /// <remarks>(mschaef) Not Implemented</remarks> /// <param name="breakStatement"></param> public override void TraverseChildren(IBreakStatement breakStatement) { throw new TranslationException("Break statements are not handled"); //StmtBuilder.Add(new Bpl.BreakCmd(breakStatement.Token(), "I dont know")); }
/// <summary> /// Performs some computation with the given break statement. /// </summary> /// <param name="breakStatement"></param> public virtual void Visit(IBreakStatement breakStatement) { this.Visit((IStatement)breakStatement); }
/// <summary> /// Returns a deep copy of the given break statement. /// </summary> /// <param name="breakStatement"></param> public BreakStatement Copy(IBreakStatement breakStatement) { Contract.Requires(breakStatement != null); Contract.Ensures(Contract.Result<BreakStatement>() != null); var mutableCopy = this.shallowCopier.Copy(breakStatement); return mutableCopy; }
public void Visit(IBreakStatement breakStatement) { throw new NotImplementedException(); }
/// <summary> /// Returns a shallow copy of the given break statement. /// </summary> /// <param name="breakStatement"></param> public BreakStatement Copy(IBreakStatement breakStatement) { Contract.Requires(breakStatement != null); Contract.Ensures(Contract.Result<BreakStatement>() != null); return new BreakStatement(breakStatement); }
public abstract IStatement Transform(IBreakStatement statement);
public override void Visit(IBreakStatement stmt, RelativeEditLocation loc) { loc.Size++; }
/// <summary> /// /// </summary> /// <param name="breakStatement"></param> public BreakStatement(IBreakStatement breakStatement) : base(breakStatement) { }
public virtual void VisitBreakStatement(IBreakStatement value) { }
public virtual void VisitBreakStatement(IBreakStatement breakStatement) { Visit(breakStatement); }
public override IStatement Visit(IBreakStatement stmt, int context) { return(new BreakStatement()); }
public override void TraverseChildren(IBreakStatement breakStatement) { MethodEnter(breakStatement); base.TraverseChildren(breakStatement); MethodExit(); }
public virtual IStatement TransformBreakStatement(IBreakStatement value) { return value; }