public void WriteItems(ExpressionWriter writer, string op) { if (this.Expressions.Count < 1) { return; } if (this.Expressions.Count > 1) { // Only write surrounding ( if needed writer.Append("("); } for (int i = 0; i < this.Expressions.Count; i++) { if (i > 0) { writer.Append(op); } writer.Append(this.Expressions[i]); } if (this.Expressions.Count > 1) { // Only write surrounding ) if needed writer.Append(")"); } }
public string ToExpressionString() { var writer = new ExpressionWriter(); writer.Append(this); string s = writer.ToString(); return(s); }
public override void Write(ExpressionWriter writer) { writer.Append(name); writer.Append("("); for (int i = 0; i < this.items.Count; i++) { if (i > 0) { writer.Append(", "); } writer.Append(this.items[i]); } writer.Append(")"); }
public abstract void Write(ExpressionWriter writer);