progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
38
AspClassic.Parser/RangeCaseClause.cs
Normal file
38
AspClassic.Parser/RangeCaseClause.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A parse tree for a case clause that compares against a range of values.
|
||||
/// </summary>
|
||||
public sealed class RangeCaseClause : CaseClause
|
||||
{
|
||||
private readonly Expression _RangeExpression;
|
||||
|
||||
/// <summary>
|
||||
/// The range expression.
|
||||
/// </summary>
|
||||
public Expression RangeExpression => _RangeExpression;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new range case clause parse tree.
|
||||
/// </summary>
|
||||
/// <param name="rangeExpression">The range expression.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
public RangeCaseClause(Expression rangeExpression, Span span)
|
||||
: base(TreeType.RangeCaseClause, span)
|
||||
{
|
||||
if (rangeExpression == null)
|
||||
{
|
||||
throw new ArgumentNullException("rangeExpression");
|
||||
}
|
||||
SetParent(rangeExpression);
|
||||
_RangeExpression = rangeExpression;
|
||||
}
|
||||
|
||||
protected override void GetChildTrees(IList<Tree> childList)
|
||||
{
|
||||
Tree.AddChild(childList, RangeExpression);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue