Esempio n. 1
0
 public override void GenerateCode(List <string> lines, int level)
 {
     if (!String.IsNullOrEmpty(Before))
     {
         lines.Add(level, Before);
     }
     if (Embrace && Code.Count > 1)
     {
         lines.Open(level);
     }
     foreach (var stmt in Code)
     {
         stmt.GenerateCode(lines, level + 1);
     }
     if (Embrace && Code.Count > 1)
     {
         lines.Close(level);
     }
     if (!String.IsNullOrEmpty(After))
     {
         if (!After.EndsWith(";"))
         {
             After += ";";
         }
         lines.Add(level, After);
     }
 }