コード例 #1
0
 private Statement GetSameLevelParent(Statement labeledStatement, IfStatement gotoStatement)
 {
     V_0 = this.GetParentsChain(labeledStatement);
     V_1 = gotoStatement.get_Parent() as BlockStatement;
     while (!V_1.get_Statements().Contains(V_0.Peek()))
     {
         dummyVar0 = V_0.Pop();
     }
     return(V_0.Peek());
 }
コード例 #2
0
 private Statement GetLowestCommonParent(Statement first, Statement second)
 {
     V_0 = this.GetParentsChain(first);
     V_1 = this.GetParentsChain(second);
     V_2 = null;
     while (V_0.Peek() == V_1.Peek())
     {
         V_2       = V_0.Pop();
         dummyVar0 = V_1.Pop();
     }
     return(V_2);
 }
コード例 #3
0
        private bool Precedes(Statement first, Statement second)
        {
            V_0 = this.GetParentsChain(first);
            V_1 = this.GetParentsChain(second);
            V_2 = null;
            while (V_0.Peek() == V_1.Peek())
            {
                V_2       = V_0.Pop();
                dummyVar0 = V_1.Pop();
            }
            if (V_2 as SwitchStatement == null)
            {
                if (V_2 as BlockStatement == null)
                {
                    throw new ArgumentException("No common block found.");
                }
                V_3 = (V_2 as BlockStatement).get_Statements().IndexOf(V_0.Peek());
                V_4 = (V_2 as BlockStatement).get_Statements().IndexOf(V_1.Peek());
                return(V_3 < V_4);
            }
            V_5 = (V_2 as SwitchStatement).get_Cases().GetEnumerator();
            try
            {
                while (V_5.MoveNext())
                {
                    if (V_5.get_Current() != V_0.Peek())
                    {
                        continue;
                    }
                    V_6 = true;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                if (V_5 != null)
                {
                    V_5.Dispose();
                }
            }
Label1:
            return(V_6);

Label0:
            return(false);
        }