#define DEBUG
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace AspClassic.Parser;
///
/// A collection of trees that are colon delimited.
///
public abstract class ColonDelimitedTreeCollection : TreeCollection where T : Tree
{
private readonly ReadOnlyCollection _ColonLocations;
///
/// The locations of the colons in the collection.
///
public ReadOnlyCollection ColonLocations => _ColonLocations;
protected ColonDelimitedTreeCollection(TreeType type, IList trees, IList colonLocations, Span span)
: base(type, trees, span)
{
Debug.Assert(type == TreeType.StatementCollection || type == TreeType.DeclarationCollection);
if (colonLocations != null && colonLocations.Count > 0)
{
_ColonLocations = new ReadOnlyCollection(colonLocations);
}
}
}