Example #1
0
        private Expression[] ReadArguments()
        {
            ExpressionCollection exps = new ExpressionCollection();

            int index = 0;
            while (true)
            {
                if (Current.TokenKind == TokenKind.RParen)
                    break;

                if (index > 0)
                    Consume(TokenKind.Comma);

                exps.Add(TopExpression());

                index++;
            }

            return exps.ToArray();
        }
Example #2
0
 public Enumerator(ExpressionCollection collection)
 {
     this.wrapped = ((CollectionBase)collection).GetEnumerator();
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the ExpressionList class, containing elements
 /// copied from another instance of ExpressionList
 /// </summary>
 /// <param name="items">
 /// The ExpressionList whose elements are to be added to the new ExpressionList.
 /// </param>
 public ExpressionCollection(ExpressionCollection items)
 {
     this.AddRange(items);
 }
Example #4
0
 /// <summary>
 /// Adds the elements of another ExpressionList to the end of this ExpressionList.
 /// </summary>
 /// <param name="items">
 /// The ExpressionList whose elements are to be added to the end of this ExpressionList.
 /// </param>
 public virtual void AddRange(ExpressionCollection items)
 {
     foreach (Expression item in items)
     {
         this.List.Add(item);
     }
 }