#define DEBUG using System.Collections.Generic; using System.Diagnostics; namespace AspClassic.Parser; /// /// A parse tree for a delegate declaration. /// public abstract class DelegateDeclaration : SignatureDeclaration { private readonly Location _SubOrFunctionLocation; /// /// The location of 'Sub' or 'Function'. /// public Location SubOrFunctionLocation => _SubOrFunctionLocation; protected DelegateDeclaration(TreeType type, AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, Location subOrFunctionLocation, SimpleName name, TypeParameterCollection typeParameters, ParameterCollection parameters, Location asLocation, AttributeBlockCollection resultTypeAttributes, TypeName resultType, Span span, IList comments) : base(type, attributes, modifiers, keywordLocation, name, typeParameters, parameters, asLocation, resultTypeAttributes, resultType, span, comments) { Debug.Assert(type == TreeType.DelegateSubDeclaration || type == TreeType.DelegateFunctionDeclaration); _SubOrFunctionLocation = subOrFunctionLocation; } protected override void GetChildTrees(IList childList) { base.GetChildTrees(childList); } }