aspclassic-core/AspClassic.Parser/NextStatement.cs
Jelle Luteijn 484dbfc9d9 progress
2022-05-15 11:19:49 +02:00

34 lines
937 B
C#

using System.Collections.Generic;
namespace AspClassic.Parser;
/// <summary>
/// A parse tree for a Next statement.
/// </summary>
public sealed class NextStatement : Statement
{
private readonly ExpressionCollection _Variables;
/// <summary>
/// The loop control variables.
/// </summary>
public ExpressionCollection Variables => _Variables;
/// <summary>
/// Constructs a parse tree for a Next statement.
/// </summary>
/// <param name="variables">The loop control variables.</param>
/// <param name="span">The location of the parse tree.</param>
/// <param name="comments">The comments for the parse tree.</param>
public NextStatement(ExpressionCollection variables, Span span, IList<Comment> comments)
: base(TreeType.NextStatement, span, comments)
{
SetParent(variables);
_Variables = variables;
}
protected override void GetChildTrees(IList<Tree> childList)
{
Tree.AddChild(childList, Variables);
}
}