override public void Pretty(StringBuilder builder) { builder.Append("("); stmt.Pretty(builder); builder.Append(","); expr.Pretty(builder); builder.Append(")"); }
// public string Name; // public Expression Expression; // public Expression Recipient; override public void Pretty(PrettyBuilder builder, int outerPrecedence, bool opposite) { if (outerPrecedence > 1) { builder.Append("("); } builder.Append($"let {Name} = "); Expression.Pretty(builder, 1, false); builder.Append(" in "); Recipient.Pretty(builder, 1, false); if (outerPrecedence > 1) { builder.Append(")"); } }
override public void Pretty(StringBuilder builder) { builder.Append(id + " := "); expr.Pretty(builder); }
override public void Pretty(StringBuilder builder) { left.Pretty(builder); builder.Append(" + "); right.Pretty(builder); }