progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
32
AspClassic.Parser/GenericBlockDeclaration.cs
Normal file
32
AspClassic.Parser/GenericBlockDeclaration.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
#define DEBUG
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a possibly generic block declaration.
|
||||
/// </summary>
|
||||
public abstract class GenericBlockDeclaration : BlockDeclaration
|
||||
{
|
||||
private readonly TypeParameterCollection _TypeParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The type parameters of the type, if any.
|
||||
/// </summary>
|
||||
public TypeParameterCollection TypeParameters => _TypeParameters;
|
||||
|
||||
protected GenericBlockDeclaration(TreeType type, AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, SimpleName name, TypeParameterCollection typeParameters, DeclarationCollection declarations, EndBlockDeclaration endStatement, Span span, IList<Comment> comments)
|
||||
: base(type, attributes, modifiers, keywordLocation, name, declarations, endStatement, span, comments)
|
||||
{
|
||||
Debug.Assert(type == TreeType.ClassDeclaration || type == TreeType.InterfaceDeclaration || type == TreeType.StructureDeclaration);
|
||||
SetParent(typeParameters);
|
||||
_TypeParameters = typeParameters;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
base.GetChildTrees(childList);
|
||||
Tree.AddChild(childList, TypeParameters);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue