progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
53
AspClassic.Parser/NewAggregateExpression.cs
Normal file
53
AspClassic.Parser/NewAggregateExpression.cs
Normal file
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a New array expression.
|
||||
/// </summary>
|
||||
public sealed class NewAggregateExpression : Expression
|
||||
{
|
||||
private readonly ArrayTypeName _Target;
|
||||
|
||||
private readonly AggregateInitializer _Initializer;
|
||||
|
||||
/// <summary>
|
||||
/// The target array type to create.
|
||||
/// </summary>
|
||||
public ArrayTypeName Target => _Target;
|
||||
|
||||
/// <summary>
|
||||
/// The initializer for the array.
|
||||
/// </summary>
|
||||
public AggregateInitializer Initializer => _Initializer;
|
||||
|
||||
/// <summary>
|
||||
/// The constructor for a New array expression parse tree.
|
||||
/// </summary>
|
||||
/// <param name="target">The target array type to create.</param>
|
||||
/// <param name="initializer">The initializer for the array.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
public NewAggregateExpression(ArrayTypeName target, AggregateInitializer initializer, Span span)
|
||||
: base(TreeType.NewAggregateExpression, span)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
throw new ArgumentNullException("target");
|
||||
}
|
||||
if (initializer == null)
|
||||
{
|
||||
throw new ArgumentNullException("initializer");
|
||||
}
|
||||
SetParent(target);
|
||||
SetParent(initializer);
|
||||
_Target = target;
|
||||
_Initializer = initializer;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
Tree.AddChild(childList, Target);
|
||||
Tree.AddChild(childList, Initializer);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue