progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
38
AspClassic.Parser/NameImport.cs
Normal file
38
AspClassic.Parser/NameImport.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for an Imports statement for a name.
|
||||
/// </summary>
|
||||
public sealed class NameImport : Import
|
||||
{
|
||||
private readonly TypeName _TypeName;
|
||||
|
||||
/// <summary>
|
||||
/// The imported name.
|
||||
/// </summary>
|
||||
public TypeName TypeName => _TypeName;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new name import parse tree.
|
||||
/// </summary>
|
||||
/// <param name="typeName">The name to import.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
public NameImport(TypeName typeName, Span span)
|
||||
: base(TreeType.NameImport, span)
|
||||
{
|
||||
if (typeName == null)
|
||||
{
|
||||
throw new ArgumentNullException("typeName");
|
||||
}
|
||||
SetParent(typeName);
|
||||
_TypeName = typeName;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
Tree.AddChild(childList, TypeName);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue