This commit is contained in:
Jelle Luteijn 2022-05-15 11:19:49 +02:00
parent 16e76d6b31
commit 484dbfc9d9
529 changed files with 113694 additions and 0 deletions

View file

@ -0,0 +1,41 @@
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);
}
}