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
9
/// VariableIdentifiers As ObjectCreationExpression <br />
10
/// VariableIdentifiers ( As TypeName )? ( Equals Expression )?
12
public abstract class VariableDeclarator : AstNode
14
public static readonly Role<VariableDeclarator> VariableDeclaratorRole = new Role<VariableDeclarator>("VariableDeclarator");
16
public AstNodeCollection<VariableIdentifier> Identifiers {
17
get { return GetChildrenByRole(VariableIdentifier.VariableIdentifierRole); }
21
public class VariableDeclaratorWithTypeAndInitializer : VariableDeclarator
24
get { return GetChildByRole(Roles.Type); }
25
set { SetChildByRole(Roles.Type, value); }
28
public Expression Initializer {
29
get { return GetChildByRole(Roles.Expression); }
30
set { SetChildByRole(Roles.Expression, value); }
33
protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
35
throw new NotImplementedException();
38
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
40
return visitor.VisitVariableDeclaratorWithTypeAndInitializer(this, data);
44
public class VariableDeclaratorWithObjectCreation : VariableDeclarator
46
public static readonly Role<ObjectCreationExpression> InitializerRole = new Role<ObjectCreationExpression>("InitializerRole");
48
public ObjectCreationExpression Initializer {
49
get { return GetChildByRole(InitializerRole); }
50
set { SetChildByRole(InitializerRole, value); }
53
protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
55
throw new NotImplementedException();
58
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
60
return visitor.VisitVariableDeclaratorWithObjectCreation(this, data);