using System;
using System.Collections.Generic;
namespace AspClassic.Parser;
///
/// A parse tree for a Resume statement.
///
public sealed class ResumeStatement : LabelReferenceStatement
{
private readonly ResumeType _ResumeType;
private readonly Location _NextLocation;
///
/// The type of the Resume statement.
///
public ResumeType ResumeType => _ResumeType;
///
/// The location of the 'Next', if any.
///
public Location NextLocation => _NextLocation;
///
/// Constructs a parse tree for a Resume statement.
///
/// The type of the Resume statement.
/// The location of the 'Next', if any.
/// The label name, if any.
/// Whether the label is a line number.
/// The location of the parse tree.
/// The comments of the parse tree.
public ResumeStatement(ResumeType resumeType, Location nextLocation, SimpleName name, bool isLineNumber, Span span, IList comments)
: base(TreeType.ResumeStatement, name, isLineNumber, span, comments)
{
if (resumeType < ResumeType.None || resumeType > ResumeType.Label)
{
throw new ArgumentOutOfRangeException("resumeType");
}
_ResumeType = resumeType;
_NextLocation = nextLocation;
}
protected override void GetChildTrees(IList childList)
{
if (ResumeType == ResumeType.Label)
{
base.GetChildTrees(childList);
}
}
}