コード例 #1
0
        /// <summary>
        /// Determines whether a given statement is empty, that is if it does not perform any operation.
        /// </summary>
        /// <param name="stmt">>A statement</param>
        /// <returns>true if the statement is empty, false if not</returns>
        public static bool IsEmpty(this Statement stmt)
        {
            EmptyStatementDetector esd = new EmptyStatementDetector();

            stmt.Accept(esd);
            return(esd.IsEmpty);
        }
コード例 #2
0
 /// <summary>
 /// Determines whether a given statement is empty, that is if it does not perform any operation.
 /// </summary>
 /// <param name="stmt">>A statement</param>
 /// <returns>true if the statement is empty, false if not</returns>
 public static bool IsEmpty(this Statement stmt)
 {
     EmptyStatementDetector esd = new EmptyStatementDetector();
     stmt.Accept(esd);
     return esd.IsEmpty;
 }