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