This commit is contained in:
Jelle Luteijn 2022-05-15 11:19:49 +02:00
parent 16e76d6b31
commit 484dbfc9d9
529 changed files with 113694 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#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);
}
}