42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for an Continue statement.
|
|
/// </summary>
|
|
public sealed class ContinueStatement : Statement
|
|
{
|
|
private readonly BlockType _ContinueType;
|
|
|
|
private readonly Location _ContinueArgumentLocation;
|
|
|
|
/// <summary>
|
|
/// The type of tree this statement continues.
|
|
/// </summary>
|
|
public BlockType ContinueType => _ContinueType;
|
|
|
|
/// <summary>
|
|
/// The location of the Continue statement type.
|
|
/// </summary>
|
|
public Location ContinueArgumentLocation => _ContinueArgumentLocation;
|
|
|
|
/// <summary>
|
|
/// Constructs a parse tree for an Continue statement.
|
|
/// </summary>
|
|
/// <param name="continueType">The type of tree this statement continues.</param>
|
|
/// <param name="continueArgumentLocation">The location of the Continue statement type.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
/// <param name="comments">The comments for the parse tree.</param>
|
|
public ContinueStatement(BlockType continueType, Location continueArgumentLocation, Span span, IList<Comment> comments)
|
|
: base(TreeType.ContinueStatement, span, comments)
|
|
{
|
|
if ((uint)continueType > 3u)
|
|
{
|
|
throw new ArgumentOutOfRangeException("continueType");
|
|
}
|
|
_ContinueType = continueType;
|
|
_ContinueArgumentLocation = continueArgumentLocation;
|
|
}
|
|
}
|