progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
25
AspClassic.Parser/DeclarationCollection.cs
Normal file
25
AspClassic.Parser/DeclarationCollection.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A read-only collection of declarations.
|
||||
/// </summary>
|
||||
public sealed class DeclarationCollection : ColonDelimitedTreeCollection<Declaration>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs a new collection of declarations.
|
||||
/// </summary>
|
||||
/// <param name="declarations">The declarations in the collection.</param>
|
||||
/// <param name="colonLocations">The locations of the colons in the collection.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
public DeclarationCollection(IList<Declaration> declarations, IList<Location> colonLocations, Span span)
|
||||
: base(TreeType.DeclarationCollection, declarations, colonLocations, span)
|
||||
{
|
||||
if ((declarations == null || declarations.Count == 0) && (colonLocations == null || colonLocations.Count == 0))
|
||||
{
|
||||
throw new ArgumentException("DeclarationCollection cannot be empty.");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue