25 lines
973 B
C#
25 lines
973 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A read-only collection of variable declarators.
|
|
/// </summary>
|
|
public sealed class VariableDeclaratorCollection : CommaDelimitedTreeCollection<VariableDeclarator>
|
|
{
|
|
/// <summary>
|
|
/// Constructs a new collection of variable declarators.
|
|
/// </summary>
|
|
/// <param name="variableDeclarators">The variable declarators 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 VariableDeclaratorCollection(IList<VariableDeclarator> variableDeclarators, IList<Location> commaLocations, Span span)
|
|
: base(TreeType.VariableDeclaratorCollection, variableDeclarators, commaLocations, span)
|
|
{
|
|
if (variableDeclarators == null || variableDeclarators.Count == 0)
|
|
{
|
|
throw new ArgumentException("VariableDeclaratorCollection cannot be empty.");
|
|
}
|
|
}
|
|
}
|