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

30 lines
1.2 KiB
C#

#define DEBUG
using System.Collections.Generic;
using System.Diagnostics;
namespace AspClassic.Parser;
/// <summary>
/// A parse tree for a delegate declaration.
/// </summary>
public abstract class DelegateDeclaration : SignatureDeclaration
{
private readonly Location _SubOrFunctionLocation;
/// <summary>
/// The location of 'Sub' or 'Function'.
/// </summary>
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<Comment> 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<Tree> childList)
{
base.GetChildTrees(childList);
}
}