This commit is contained in:
Jelle Luteijn 2022-05-15 11:19:49 +02:00
parent 16e76d6b31
commit 484dbfc9d9
529 changed files with 113694 additions and 0 deletions

View file

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
namespace AspClassic.Parser;
/// <summary>
/// A parse tree for a simple name expression.
/// </summary>
public sealed class SimpleNameExpression : Expression
{
private readonly SimpleName _Name;
/// <summary>
/// The name.
/// </summary>
public SimpleName Name => _Name;
/// <summary>
/// Constructs a new parse tree for a simple name expression.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="span">The location of the parse tree.</param>
public SimpleNameExpression(SimpleName name, Span span)
: base(TreeType.SimpleNameExpression, span)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
SetParent(name);
_Name = name;
}
protected override void GetChildTrees(IList<Tree> childList)
{
Tree.AddChild(childList, Name);
}
}