39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for an assembly-level or module-level attribute declaration.
|
|
/// </summary>
|
|
public sealed class AttributeDeclaration : Declaration
|
|
{
|
|
private readonly AttributeBlockCollection _Attributes;
|
|
|
|
/// <summary>
|
|
/// The attributes.
|
|
/// </summary>
|
|
public AttributeBlockCollection Attributes => _Attributes;
|
|
|
|
/// <summary>
|
|
/// Constructs a new parse tree for assembly-level or module-level attribute declarations.
|
|
/// </summary>
|
|
/// <param name="attributes">The attributes.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
/// <param name="comments">The comments for the parse tree.</param>
|
|
public AttributeDeclaration(AttributeBlockCollection attributes, Span span, IList<Comment> comments)
|
|
: base(TreeType.AttributeDeclaration, span, comments)
|
|
{
|
|
if (attributes == null)
|
|
{
|
|
throw new ArgumentNullException("attributes");
|
|
}
|
|
SetParent(attributes);
|
|
_Attributes = attributes;
|
|
}
|
|
|
|
protected override void GetChildTrees(IList<Tree> childList)
|
|
{
|
|
Tree.AddChild(childList, Attributes);
|
|
}
|
|
}
|