aspclassic-core/AspClassic.Parser/BlockStatement.cs
Jelle Luteijn 484dbfc9d9 progress
2022-05-15 11:19:49 +02:00

28 lines
668 B
C#

using System.Collections.Generic;
namespace AspClassic.Parser;
/// <summary>
/// A parse tree for a block statement.
/// </summary>
public abstract class BlockStatement : Statement
{
private readonly StatementCollection _Statements;
/// <summary>
/// The statements in the block.
/// </summary>
public StatementCollection Statements => _Statements;
protected BlockStatement(TreeType type, StatementCollection statements, Span span, IList<Comment> comments)
: base(type, span, comments)
{
_Statements = statements;
SetParent(statements);
}
protected override void GetChildTrees(IList<Tree> childList)
{
Tree.AddChild(childList, Statements);
}
}