コード例 #1
0
        /// <summary>
        /// Returns the set of direct successors of a statement.
        /// </summary>
        /// <remarks>
        /// This operation is only valid on atomic statements, that is all statement types except <c>CompoundStatement</c> and
        /// <c>LoopBlock</c>.
        /// Furthermore, only atomic statements constitute the result enumeration.
        /// </remarks>
        /// <param name="stmt">statement whose program flow successors shall be retrieved</param>
        /// <returns>an enumeration of all possible program flow successors</returns>
        public static IEnumerable <Statement> GetProgramflowSucessors(Statement stmt)
        {
            ProgramflowSuccessorsGetter psg = new ProgramflowSuccessorsGetter();

            stmt.Accept(psg);
            return(psg.Result);
        }
コード例 #2
0
 /// <summary>
 /// Returns the set of direct successors of a statement.
 /// </summary>
 /// <remarks>
 /// This operation is only valid on atomic statements, that is all statement types except <c>CompoundStatement</c> and 
 /// <c>LoopBlock</c>.
 /// Furthermore, only atomic statements constitute the result enumeration.
 /// </remarks>
 /// <param name="stmt">statement whose program flow successors shall be retrieved</param>
 /// <returns>an enumeration of all possible program flow successors</returns>
 public static IEnumerable<Statement> GetProgramflowSucessors(Statement stmt)
 {
     ProgramflowSuccessorsGetter psg = new ProgramflowSuccessorsGetter();
     stmt.Accept(psg);
     return psg.Result;
 }