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