53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for a qualified name expression.
|
|
/// </summary>
|
|
public sealed class GenericQualifiedExpression : Expression
|
|
{
|
|
private readonly Expression _Base;
|
|
|
|
private readonly TypeArgumentCollection _TypeArguments;
|
|
|
|
/// <summary>
|
|
/// The base expression.
|
|
/// </summary>
|
|
public Expression Base => _Base;
|
|
|
|
/// <summary>
|
|
/// The qualifying type arguments.
|
|
/// </summary>
|
|
public TypeArgumentCollection TypeArguments => _TypeArguments;
|
|
|
|
/// <summary>
|
|
/// Constructs a new parse tree for a generic qualified expression.
|
|
/// </summary>
|
|
/// <param name="base">The base expression.</param>
|
|
/// <param name="typeArguments">The qualifying type arguments.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
public GenericQualifiedExpression(Expression @base, TypeArgumentCollection typeArguments, Span span)
|
|
: base(TreeType.GenericQualifiedExpression, span)
|
|
{
|
|
if (@base == null)
|
|
{
|
|
throw new ArgumentNullException("base");
|
|
}
|
|
if (typeArguments == null)
|
|
{
|
|
throw new ArgumentNullException("typeArguments");
|
|
}
|
|
SetParent(@base);
|
|
SetParent(typeArguments);
|
|
_Base = @base;
|
|
_TypeArguments = typeArguments;
|
|
}
|
|
|
|
protected override void GetChildTrees(IList<Tree> childList)
|
|
{
|
|
Tree.AddChild(childList, Base);
|
|
Tree.AddChild(childList, TypeArguments);
|
|
}
|
|
}
|