progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
38
AspClassic.Parser/ModifiedDeclaration.cs
Normal file
38
AspClassic.Parser/ModifiedDeclaration.cs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue