progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
52
AspClassic.Parser/ResumeStatement.cs
Normal file
52
AspClassic.Parser/ResumeStatement.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a Resume statement.
|
||||
/// </summary>
|
||||
public sealed class ResumeStatement : LabelReferenceStatement
|
||||
{
|
||||
private readonly ResumeType _ResumeType;
|
||||
|
||||
private readonly Location _NextLocation;
|
||||
|
||||
/// <summary>
|
||||
/// The type of the Resume statement.
|
||||
/// </summary>
|
||||
public ResumeType ResumeType => _ResumeType;
|
||||
|
||||
/// <summary>
|
||||
/// The location of the 'Next', if any.
|
||||
/// </summary>
|
||||
public Location NextLocation => _NextLocation;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a parse tree for a Resume statement.
|
||||
/// </summary>
|
||||
/// <param name="resumeType">The type of the Resume statement.</param>
|
||||
/// <param name="nextLocation">The location of the 'Next', if any.</param>
|
||||
/// <param name="name">The label name, if any.</param>
|
||||
/// <param name="isLineNumber">Whether the label is a line number.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
/// <param name="comments">The comments of the parse tree.</param>
|
||||
public ResumeStatement(ResumeType resumeType, Location nextLocation, SimpleName name, bool isLineNumber, Span span, IList<Comment> 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<Tree> childList)
|
||||
{
|
||||
if (ResumeType == ResumeType.Label)
|
||||
{
|
||||
base.GetChildTrees(childList);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue