示例#1
0
 public code_block(code_block comprehensive_block)
 {
     _up_block = comprehensive_block;
 }
 //Проверяет, возможен ли переход от блока goto_block в label_block
 public bool check_can_goto(code_block label_block, code_block goto_block)
 {
     code_block current_block = goto_block;
     while (current_block != null)
     {
         if (current_block == label_block)
         {
             return true;
         }
         else
         {
             current_block = current_block.up_block;
         }
     }
     return false;
 }