예제 #1
0
 override public void Pretty(PrettyBuilder builder)
 {
     builder.NewLine();
     builder.Append("{");
     builder.Indent();
     builder.PrettyStm(stmList);
     builder.Unindent();
     builder.NewLine();
     builder.Append("}");
 }
예제 #2
0
        // public Expression Expression1;
        // public Expression Expression2;

        override public void Pretty(PrettyBuilder builder, int outerPrecedence, bool opposite)
        {
            if (outerPrecedence > 0)
            {
                builder.Append("(");
                builder.Indent();
                builder.NewLine();
            }
            Expression1.Pretty(builder, 0, false);
            builder.Append(", ");
            builder.NewLine();
            Expression2.Pretty(builder, 0, false);
            if (outerPrecedence > 0)
            {
                builder.Unindent();
                builder.NewLine();
                builder.Append(")");
                builder.NewLine();
            }
        }