This commit is contained in:
Jelle Luteijn 2022-05-15 11:19:49 +02:00
parent 16e76d6b31
commit 484dbfc9d9
529 changed files with 113694 additions and 0 deletions

View file

@ -0,0 +1,38 @@
using System.Collections.Generic;
namespace AspClassic.Parser;
/// <summary>
/// A parse tree for a declaration with modifiers.
/// </summary>
public abstract class ModifiedDeclaration : Declaration
{
private readonly AttributeBlockCollection _Attributes;
private readonly ModifierCollection _Modifiers;
/// <summary>
/// The attributes on the declaration.
/// </summary>
public AttributeBlockCollection Attributes => _Attributes;
/// <summary>
/// The modifiers on the declaration.
/// </summary>
public ModifierCollection Modifiers => _Modifiers;
protected ModifiedDeclaration(TreeType type, AttributeBlockCollection attributes, ModifierCollection modifiers, Span span, IList<Comment> comments)
: base(type, span, comments)
{
SetParent(attributes);
SetParent(modifiers);
_Attributes = attributes;
_Modifiers = modifiers;
}
protected override void GetChildTrees(IList<Tree> childList)
{
Tree.AddChild(childList, Attributes);
Tree.AddChild(childList, Modifiers);
}
}