progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
40
AspClassic.Parser/InheritsDeclaration.cs
Normal file
40
AspClassic.Parser/InheritsDeclaration.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for an Inherits declaration.
|
||||
/// </summary>
|
||||
public sealed class InheritsDeclaration : Declaration
|
||||
{
|
||||
private readonly TypeNameCollection _InheritedTypes;
|
||||
|
||||
/// <summary>
|
||||
/// The list of types.
|
||||
/// </summary>
|
||||
public TypeNameCollection InheritedTypes => _InheritedTypes;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a parse tree for an Inherits declaration.
|
||||
/// </summary>
|
||||
/// <param name="inheritedTypes">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 InheritsDeclaration(TypeNameCollection inheritedTypes, Span span, IList<Comment> comments)
|
||||
: base(TreeType.InheritsDeclaration, span, comments)
|
||||
{
|
||||
if (inheritedTypes == null)
|
||||
{
|
||||
throw new ArgumentNullException("inheritedTypes");
|
||||
}
|
||||
SetParent(inheritedTypes);
|
||||
_InheritedTypes = inheritedTypes;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
base.GetChildTrees(childList);
|
||||
Tree.AddChild(childList, InheritedTypes);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue