Пример #1
0
 public override void VisitDoWhileStatement(DoWhileStatement node)
 {
     this.TryProcessConditionStatement(node);
     this.states.Push(2);
     this.Visit(node.get_Condition());
     dummyVar0 = this.states.Pop();
     this.Visit(node.get_Body());
     if (this.processStep == RemoveConditionOnlyVariables.ProcessStep.Search)
     {
         this.SetVariablesExpressionStatements(node);
     }
     return;
 }
 public override void VisitBlockStatement(BlockStatement node)
 {
     V_0 = 0;
     while (V_0 < node.get_Statements().get_Count() - 1)
     {
         if (node.get_Statements().get_Item(V_0) as ForStatement != null)
         {
             V_1             = node.get_Statements().get_Item(V_0) as ForStatement;
             stackVariable23 = this.GetForAssignExpression(V_1.get_Initializer());
             V_2             = this.GetForBinaryExpression(V_1.get_Condition());
             V_3             = this.GetForIncrementExpression(V_1.get_Increment());
             if (stackVariable23 == null || V_2 == null || V_3 == null)
             {
                 V_4 = new DoWhileStatement(V_1.get_Condition(), V_1.get_Body());
                 V_4.get_Body().AddStatement(new ExpressionStatement(V_1.get_Increment()));
                 node.get_Statements().set_Item(V_0, new ExpressionStatement(V_1.get_Initializer()));
                 node.get_Statements().Insert(V_0 + 1, V_4);
             }
         }
         V_0 = V_0 + 1;
     }
     this.VisitBlockStatement(node);
     return;
 }
Пример #3
0
 public virtual void VisitDoWhileStatement(DoWhileStatement node)
 {
     this.Visit(node.get_Body());
     this.Visit(node.get_Condition());
     return;
 }
 public virtual ICodeNode VisitDoWhileStatement(DoWhileStatement node)
 {
     node.set_Body((BlockStatement)this.Visit(node.get_Body()));
     node.set_Condition((Expression)this.Visit(node.get_Condition()));
     return(node);
 }