예제 #1
0
 public void willExit()
 {
     if (exit != null)
     {
         if (exit.isExitDone())
         {
             error = exit.getFailure();
             exit  = null;
         }
         else if (!exit.isExitDone() && current().parent == null)
         {
             if (exit.isExitLabel())
             {
                 error = new Exception("BAD LABEL - " + exit.name + " - " + exit.from);
                 exit  = null;
             }
             else if (exit.isExitLoop())
             {
                 string exitName = exit.name;
                 if (exitName == null)
                 {
                     exitName = "";
                 }
                 error = new Exception("NO ANCESTOR - " + exitName);
                 exit  = null;
             }
             else
             {
                 error = exit.getFailure();
                 exit  = null;
             }
         }
     }
 }
예제 #2
0
 public void willExit()
 {
     if (exit != null)
     {
         if (exit.isExitDone())
         {
             error = exit.getFailure();
             exit = null;
         }else if (!exit.isExitDone() && current().parent == null)
         {
             if (exit.isExitLabel())
             {
                 error = new Exception("BAD LABEL - " + exit.name + " - " + exit.from);
                 exit = null;
             }
             else if (exit.isExitLoop())
             {
                 string exitName = exit.name;
                 if (exitName == null)
                 {
                     exitName = "";
                 }
                 error = new Exception("NO ANCESTOR - " + exitName);
                 exit = null;
             }
             else
             {
                 error = exit.getFailure();
                 exit = null;
             }
         }
     }
 }