Example #1
0
 private Conditional CreateConditional(StructureNode node, StructureNode follow)
 {
     if (node.BlockType == BlockTerminationType.Multiway)
     {
         var c = new Case(follow);
         var cf = new CaseFinder(node, follow);
         cf.SetCaseHead(node);
         return c;
     }
     else if (node.Else == follow)
         return new IfThen(follow);
     else if (node.Then == follow)
         return new IfElse(follow);
     else
         return new IfThenElse(follow);
 }
Example #2
0
 private Conditional CreateConditional(StructureNode node, StructureNode follow)
 {
     if (node.BlockType == BlockTerminationType.Multiway)
     {
         var c  = new Case(follow);
         var cf = new CaseFinder(node, follow);
         cf.SetCaseHead(node);
         return(c);
     }
     else if (node.Else == follow)
     {
         return(new IfThen(follow));
     }
     else if (node.Then == follow)
     {
         return(new IfElse(follow));
     }
     else
     {
         return(new IfThenElse(follow));
     }
 }