40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for an Implements declaration.
|
|
/// </summary>
|
|
public sealed class ImplementsDeclaration : Declaration
|
|
{
|
|
private readonly TypeNameCollection _ImplementedTypes;
|
|
|
|
/// <summary>
|
|
/// The list of types.
|
|
/// </summary>
|
|
public TypeNameCollection ImplementedTypes => _ImplementedTypes;
|
|
|
|
/// <summary>
|
|
/// Constructs a parse tree for an Implements declaration.
|
|
/// </summary>
|
|
/// <param name="implementedTypes">The types inherited or implemented.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
/// <param name="comments">The comments for the parse tree.</param>
|
|
public ImplementsDeclaration(TypeNameCollection implementedTypes, Span span, IList<Comment> comments)
|
|
: base(TreeType.ImplementsDeclaration, span, comments)
|
|
{
|
|
if (implementedTypes == null)
|
|
{
|
|
throw new ArgumentNullException("implementedTypes");
|
|
}
|
|
SetParent(implementedTypes);
|
|
_ImplementedTypes = implementedTypes;
|
|
}
|
|
|
|
protected override void GetChildTrees(IList<Tree> childList)
|
|
{
|
|
base.GetChildTrees(childList);
|
|
Tree.AddChild(childList, ImplementedTypes);
|
|
}
|
|
}
|