1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
6
namespace ICSharpCode.NRefactory.VB.Ast
8
public class DelegateDeclaration : AttributedNode
10
public bool IsSub { get; set; }
12
public AstNodeCollection<TypeParameterDeclaration> TypeParameters {
13
get { return GetChildrenByRole(Roles.TypeParameter); }
16
public Identifier Name {
17
get { return GetChildByRole(Roles.Identifier); }
18
set { SetChildByRole(Roles.Identifier, value); }
21
public AstNodeCollection<ParameterDeclaration> Parameters {
22
get { return GetChildrenByRole(Roles.Parameter); }
25
public AstNodeCollection<AttributeBlock> ReturnTypeAttributes {
26
get { return GetChildrenByRole(AttributeBlock.ReturnTypeAttributeBlockRole); }
29
public AstType ReturnType {
30
get { return GetChildByRole(Roles.Type); }
31
set { SetChildByRole(Roles.Type, value); }
34
protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
36
var o = other as DelegateDeclaration;
38
MatchAttributesAndModifiers(o, match) &&
40
TypeParameters.DoMatch(o.TypeParameters, match) &&
41
Name.DoMatch(o.Name, match) &&
42
Parameters.DoMatch(o.Parameters, match) &&
43
ReturnTypeAttributes.DoMatch(o.ReturnTypeAttributes, match) &&
44
ReturnType.DoMatch(o.ReturnType, match);
47
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
49
return visitor.VisitDelegateDeclaration(this, data);