39 lines
1 KiB
C#
39 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for an Erase statement.
|
|
/// </summary>
|
|
public sealed class EraseStatement : Statement
|
|
{
|
|
private readonly ExpressionCollection _Variables;
|
|
|
|
/// <summary>
|
|
/// The variables to erase.
|
|
/// </summary>
|
|
public ExpressionCollection Variables => _Variables;
|
|
|
|
/// <summary>
|
|
/// Constructs a new parse tree for an Erase statement.
|
|
/// </summary>
|
|
/// <param name="variables">The variables to erase.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
/// <param name="comments">The comments for the parse tree.</param>
|
|
public EraseStatement(ExpressionCollection variables, Span span, IList<Comment> comments)
|
|
: base(TreeType.EraseStatement, span, comments)
|
|
{
|
|
if (variables == null)
|
|
{
|
|
throw new ArgumentNullException("variables");
|
|
}
|
|
SetParent(variables);
|
|
_Variables = variables;
|
|
}
|
|
|
|
protected override void GetChildTrees(IList<Tree> childList)
|
|
{
|
|
Tree.AddChild(childList, Variables);
|
|
}
|
|
}
|