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
/// Description of XmlIdentifier.
11
public class XmlIdentifier : AstNode
13
public static readonly new XmlIdentifier Null = new NullXmlIdentifier();
15
class NullXmlIdentifier : XmlIdentifier
17
public override bool IsNull {
23
public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)
28
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
30
return other == null || other.IsNull;
34
public string Name { get; set; }
36
TextLocation startLocation;
37
public override TextLocation StartLocation {
38
get { return startLocation; }
41
TextLocation endLocation;
42
public override TextLocation EndLocation {
43
get { return endLocation; }
46
private XmlIdentifier()
48
this.Name = string.Empty;
51
public XmlIdentifier(string name, TextLocation startLocation, TextLocation endLocation)
54
this.startLocation = startLocation;
55
this.endLocation = endLocation;
58
protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
60
var ident = other as XmlIdentifier;
62
&& MatchStringXml(Name, ident.Name)
63
&& ident.startLocation == startLocation
64
&& ident.endLocation == endLocation;
67
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
69
return visitor.VisitXmlIdentifier(this, data);