using System; using System.Collections.Generic; namespace AspClassic.Parser; /// /// A read-only collection of expressions. /// public sealed class ExpressionCollection : CommaDelimitedTreeCollection { /// /// Constructs a new collection of expressions. /// /// The expressions in the collection. /// The locations of the commas in the collection. /// The location of the parse tree. public ExpressionCollection(IList expressions, IList commaLocations, Span span) : base(TreeType.ExpressionCollection, expressions, commaLocations, span) { if ((expressions == null || expressions.Count == 0) && (commaLocations == null || commaLocations.Count == 0)) { throw new ArgumentException("ExpressionCollection cannot be empty."); } } }