Пример #1
0
 public static WhileContext GetContainingWhileContext(ControlFlowContext ctxt, ControlFlowContext stop_ctxt = null)
 {
     while (ctxt != null)
     {
         if (ctxt.IsWhileContext() || ctxt == stop_ctxt)
         {
             return(ctxt as WhileContext);
         }
         ctxt = ctxt.outer_context;
     }
     return(null);
 }