using System.Collections.Generic; namespace AspClassic.Parser; /// /// A parse tree for a Get property accessor. /// public sealed class GetAccessorDeclaration : ModifiedDeclaration { private readonly Location _GetLocation; private readonly StatementCollection _Statements; private readonly EndBlockDeclaration _EndDeclaration; /// /// The location of the 'Get'. /// public Location GetLocation => _GetLocation; /// /// The statements in the accessor. /// public StatementCollection Statements => _Statements; /// /// The End declaration for the accessor. /// public EndBlockDeclaration EndDeclaration => _EndDeclaration; /// /// Constructs a new parse tree for a Get property accessor. /// /// The attributes for the parse tree. /// The modifiers for the parse tree. /// The location of the 'Get'. /// The statements in the declaration. /// The end block declaration, if any. /// The location of the parse tree. /// The comments for the parse tree. public GetAccessorDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location getLocation, StatementCollection statements, EndBlockDeclaration endDeclaration, Span span, IList comments) : base(TreeType.GetAccessorDeclaration, attributes, modifiers, span, comments) { SetParent(statements); SetParent(endDeclaration); _GetLocation = getLocation; _Statements = statements; _EndDeclaration = endDeclaration; } protected override void GetChildTrees(IList childList) { base.GetChildTrees(childList); Tree.AddChild(childList, Statements); Tree.AddChild(childList, EndDeclaration); } }