예제 #1
0
 public void AppendPrint(int indent, StringBuilder buf)
 {
     Helper.PrintASTIndent(indent, buf);
     if (!string.IsNullOrEmpty(Label))
     {
         buf.Append(Label + ": ");
     }
     buf.AppendLine("for " + Var + " in");
     From.AppendPrint(indent + 2, buf);
     if (To != null)
     {
         Helper.PrintASTIndentLine("to", indent + 1, buf);
         To.AppendPrint(indent + 2, buf);
     }
     if (By != null)
     {
         Helper.PrintASTIndentLine("by", indent + 1, buf);
         By.AppendPrint(indent + 2, buf);
     }
     foreach (var s in Statements)
     {
         s.AppendPrint(indent + 1, buf);
     }
 }