aspclassic-core/AspClassic.Parser/CaseClauseCollection.cs
Jelle Luteijn 484dbfc9d9 progress
2022-05-15 11:19:49 +02:00

25 lines
851 B
C#

using System;
using System.Collections.Generic;
namespace AspClassic.Parser;
/// <summary>
/// A collection of case clauses.
/// </summary>
public sealed class CaseClauseCollection : CommaDelimitedTreeCollection<CaseClause>
{
/// <summary>
/// Constructs a new collection of case clauses.
/// </summary>
/// <param name="caseClauses">The case clauses in the collection.</param>
/// <param name="commaLocations">The locations of the commas in the list.</param>
/// <param name="span">The location of the parse tree.</param>
public CaseClauseCollection(IList<CaseClause> caseClauses, IList<Location> commaLocations, Span span)
: base(TreeType.CaseClauseCollection, caseClauses, commaLocations, span)
{
if (caseClauses == null || caseClauses.Count == 0)
{
throw new ArgumentException("CaseClauseCollection cannot be empty.");
}
}
}