Ejemplo n.º 1
0
        /// <summary>
        /// Perform flow analysis, reporting all necessary diagnostics.  Returns true if the end of
        /// the body might be reachable..
        /// </summary>
        /// <param name="compilation"></param>
        /// <param name="tree"></param>
        /// <param name="method"></param>
        /// <param name="block"></param>
        /// <param name="diagnostics"></param>
        /// <returns></returns>
        public static bool Analyze(Compilation compilation, SyntaxTree tree, MethodSymbol method, BoundStatement block, DiagnosticBag diagnostics)
        {
            var walker = new FlowAnalysisWalker(compilation, tree, method, block);
            var result = walker.Analyze(diagnostics);

            walker.Free();
            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Perform flow analysis, reporting all necessary diagnostics.  Returns true if the end of
 /// the body might be reachable..
 /// </summary>
 /// <param name="compilation"></param>
 /// <param name="tree"></param>
 /// <param name="method"></param>
 /// <param name="block"></param>
 /// <param name="diagnostics"></param>
 /// <returns></returns>
 public static bool Analyze(Compilation compilation, SyntaxTree tree, MethodSymbol method, BoundStatement block, DiagnosticBag diagnostics)
 {
     var walker = new FlowAnalysisWalker(compilation, tree, method, block);
     var result = walker.Analyze(diagnostics);
     walker.Free();
     return result;
 }