25 lines
891 B
C#
25 lines
891 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A read-only collection of variable names.
|
|
/// </summary>
|
|
public sealed class VariableNameCollection : CommaDelimitedTreeCollection<VariableName>
|
|
{
|
|
/// <summary>
|
|
/// Constructs a new variable name collection.
|
|
/// </summary>
|
|
/// <param name="variableNames">The variable names in the collection.</param>
|
|
/// <param name="commaLocations">The locations of the commas in the collection.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
public VariableNameCollection(IList<VariableName> variableNames, IList<Location> commaLocations, Span span)
|
|
: base(TreeType.VariableNameCollection, variableNames, commaLocations, span)
|
|
{
|
|
if (variableNames == null || variableNames.Count == 0)
|
|
{
|
|
throw new ArgumentException("VariableNameCollection cannot be empty.");
|
|
}
|
|
}
|
|
}
|