using System;
using System.Collections.Generic;
namespace AspClassic.Parser;
///
/// A parse tree for an Imports statement for a name.
///
public sealed class NameImport : Import
{
private readonly TypeName _TypeName;
///
/// The imported name.
///
public TypeName TypeName => _TypeName;
///
/// Constructs a new name import parse tree.
///
/// The name to import.
/// The location of the parse tree.
public NameImport(TypeName typeName, Span span)
: base(TreeType.NameImport, span)
{
if (typeName == null)
{
throw new ArgumentNullException("typeName");
}
SetParent(typeName);
_TypeName = typeName;
}
protected override void GetChildTrees(IList childList)
{
Tree.AddChild(childList, TypeName);
}
}