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