Exemplo n.º 1
0
 public override void Pretty(PrettyBuilder builder, int outerPrecedence, bool opposite)
 {
     builder.Append("{");
     if (stmt != null)
     {
         builder.Indent();
         builder.NewLine();
         if (stmt != null)
         {
             stmt.Pretty(builder, 0, false);
         }
         builder.Unindent();
         builder.NewLine();
     }
     else
     {
         builder.NewLine();
     }
     builder.Append("}");
 }
Exemplo n.º 2
0
 public override void Pretty(PrettyBuilder builder, int outerPrecedence, bool opposite)
 {
     if (head != null)
     {
         head.Pretty(builder, 0, false);
         builder.NewLine();
     }
     if (tail != null)
     {
         tail.Pretty(builder, 0, false);
     }
 }
Exemplo n.º 3
0
 public override void Pretty(PrettyBuilder builder, int outerPrecedence, bool opposite)
 {
     builder.Append("while (");
     expr.Pretty(builder, 0, false);
     builder.Append(")");
     //builder.Indent();
     builder.NewLine();
     if (stmt != null)
     {
         stmt.Pretty(builder, 0, false);
     }
     //builder.Unindent();
 }
Exemplo n.º 4
0
 public override void Pretty(PrettyBuilder builder, int outerPrecedence, bool opposite)
 {
     if (head != null)
     {
         head.Pretty(builder, 0, false);
         //if(!head.complexStatement)
         //    builder.Append(";");
         builder.NewLine();
     }
     if (tail != null)
     {
         tail.Pretty(builder, 0, false);
         if (!tail.complexStatement)
         {
             builder.Append(";");
         }
     }
 }