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