using System; using System.Collections.Generic; namespace AspClassic.Parser; /// /// A parse tree for an Inherits declaration. /// public sealed class InheritsDeclaration : Declaration { private readonly TypeNameCollection _InheritedTypes; /// /// The list of types. /// public TypeNameCollection InheritedTypes => _InheritedTypes; /// /// Constructs a parse tree for an Inherits declaration. /// /// The types inherited or implemented. /// The location of the parse tree. /// The comments for the parse tree. public InheritsDeclaration(TypeNameCollection inheritedTypes, Span span, IList comments) : base(TreeType.InheritsDeclaration, span, comments) { if (inheritedTypes == null) { throw new ArgumentNullException("inheritedTypes"); } SetParent(inheritedTypes); _InheritedTypes = inheritedTypes; } protected override void GetChildTrees(IList childList) { base.GetChildTrees(childList); Tree.AddChild(childList, InheritedTypes); } }