Пример #1
0
 // normalizing the else if control to make sure that
 // there is a space before else if control.
 public void elseifcontrol(List<string> lis){
   List<string> li = new List<string>();
   int i = 0;
   foreach (string line in lis){
     i++;
     if (line.Contains("else if")){
       string h = li[i - 2].Replace("}", "} " + line);
       li[i - 2].Remove(0);
       string g = h.TrimStart();
       li[i - 2] = g;
       i--;
     } else {
       li.Add(line);
     }
   }
   Layers lay = new Layers();
   lay.IndentNormalizer(li);
 }