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)
7
namespace ICSharpCode.NRefactory.VB.Ast
10
/// Exit ( Do | For | While | Select | Sub | Function | Property | Try )
12
public class ExitStatement : Statement
14
public static readonly Role<VBTokenNode> ExitKindTokenRole = new Role<VBTokenNode>("ExitKindToken");
16
public ExitKind ExitKind { get; set; }
18
public VBTokenNode ExitToken {
19
get { return GetChildByRole (Roles.Keyword); }
22
public VBTokenNode ExitKindToken {
23
get { return GetChildByRole (ExitKindTokenRole); }
26
public ExitStatement(ExitKind kind)
31
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
33
return visitor.VisitExitStatement(this, data);
36
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
38
ExitStatement o = other as ExitStatement;
39
return o != null && this.ExitKind == o.ExitKind;