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