using System;
using System.Collections.Generic;
namespace AspClassic.Parser;
///
/// A parse tree for an Imports declaration.
///
public sealed class ImportsDeclaration : Declaration
{
private readonly ImportCollection _ImportMembers;
///
/// The members imported.
///
public ImportCollection ImportMembers => _ImportMembers;
///
/// Constructs a parse tree for an Imports declaration.
///
/// The members imported.
/// The location of the parse tree.
/// The comments for the parse tree.
public ImportsDeclaration(ImportCollection importMembers, Span span, IList comments)
: base(TreeType.ImportsDeclaration, span, comments)
{
if (importMembers == null)
{
throw new ArgumentNullException("importMembers");
}
SetParent(importMembers);
_ImportMembers = importMembers;
}
protected override void GetChildTrees(IList childList)
{
base.GetChildTrees(childList);
Tree.AddChild(childList, ImportMembers);
}
}