private void TransferLabel(ExpressionStatement expressionStatement)
 {
     if (String.op_Equality(expressionStatement.get_Label(), String.Empty))
     {
         return;
     }
     V_0 = expressionStatement.get_Label();
     V_1 = expressionStatement;
     while (V_1.get_Parent() != null)
     {
         V_3 = V_1.get_Parent() as BlockStatement;
         V_4 = V_3.get_Statements().IndexOf(V_1);
         if (V_4 != V_3.get_Statements().get_Count() - 1)
         {
             V_5 = V_3.get_Statements().get_Item(V_4 + 1);
             this.MoveLabel(V_5, V_0);
             return;
         }
         if (this.IsLoopBody(V_3))
         {
             this.MoveLabel(V_3.get_Statements().get_Item(0), V_0);
             return;
         }
         do
         {
             V_1 = V_1.get_Parent();
         }while (V_1.get_Parent() != null && V_1.get_Parent().get_CodeNodeType() != CodeNodeType.BlockStatement);
     }
     V_2 = new EmptyStatement();
     this.theBody.get_Statements().Add(V_2);
     this.MoveLabel(V_2, V_0);
     return;
 }
Beispiel #2
0
 public override ICodeNode VisitExpressionStatement(ExpressionStatement node)
 {
     V_0 = (Expression)this.Visit(node.get_Expression());
     if (V_0 != null)
     {
         node.set_Expression(V_0);
         return(node);
     }
     if (!String.IsNullOrEmpty(node.get_Label()))
     {
         V_1 = node.GetNextStatement();
         if (V_1 == null || !String.IsNullOrEmpty(V_1.get_Label()))
         {
             stackVariable16 = new EmptyStatement();
             stackVariable16.set_Label(node.get_Label());
             return(stackVariable16);
         }
         V_1.set_Label(node.get_Label());
     }
     return(null);
 }
Beispiel #3
0
 public override ICodeNode VisitExpressionStatement(ExpressionStatement node)
 {
     node.set_Expression((Expression)this.Visit(node.get_Expression()));
     if (node.get_Expression() != null)
     {
         return(node);
     }
     if (node.get_Label() != null && String.op_Inequality(node.get_Label(), String.Empty))
     {
         V_0 = node.GetNextStatement();
         if (V_0 == null || V_0.get_Label() != null && String.op_Inequality(V_0.get_Label(), String.Empty))
         {
             stackVariable19 = new EmptyStatement();
             stackVariable19.set_Label(node.get_Label());
             V_1 = stackVariable19;
             this.methodContext.get_GotoLabels().set_Item(node.get_Label(), V_1);
             return(V_1);
         }
         V_0.set_Label(node.get_Label());
         this.methodContext.get_GotoLabels().set_Item(node.get_Label(), V_0);
     }
     return(null);
 }