41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A parse tree for an Else If block statement.
|
|
/// </summary>
|
|
public sealed class ElseIfBlockStatement : BlockStatement
|
|
{
|
|
private readonly ElseIfStatement _ElseIfStatement;
|
|
|
|
/// <summary>
|
|
/// The Else If statement.
|
|
/// </summary>
|
|
public ElseIfStatement ElseIfStatement => _ElseIfStatement;
|
|
|
|
/// <summary>
|
|
/// Constructs a new parse tree for an Else If block statement.
|
|
/// </summary>
|
|
/// <param name="elseIfStatement">The Else If statement.</param>
|
|
/// <param name="statements">The statements in the block.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
/// <param name="comments">The comments for the parse tree.</param>
|
|
public ElseIfBlockStatement(ElseIfStatement elseIfStatement, StatementCollection statements, Span span, IList<Comment> comments)
|
|
: base(TreeType.ElseIfBlockStatement, statements, span, comments)
|
|
{
|
|
if (elseIfStatement == null)
|
|
{
|
|
throw new ArgumentNullException("elseIfStatement");
|
|
}
|
|
SetParent(elseIfStatement);
|
|
_ElseIfStatement = elseIfStatement;
|
|
}
|
|
|
|
protected override void GetChildTrees(IList<Tree> childList)
|
|
{
|
|
Tree.AddChild(childList, ElseIfStatement);
|
|
base.GetChildTrees(childList);
|
|
}
|
|
}
|