Ejemplo n.º 1
0
        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(")");
            }
        }
Ejemplo n.º 2
0
 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(")");
 }
Ejemplo n.º 3
0
        public string ToExpressionString()
        {
            var writer = new ExpressionWriter();

            writer.Append(this);
            string s = writer.ToString();

            return(s);
        }