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)
4
using System.Collections.Generic;
7
namespace ICSharpCode.NRefactory.VB.Ast
9
public class PrimitiveType : AstType
11
public string Keyword { get; set; }
12
public TextLocation Location { get; set; }
14
public PrimitiveType()
18
public PrimitiveType(string keyword)
20
this.Keyword = keyword;
23
public PrimitiveType(string keyword, TextLocation location)
25
this.Keyword = keyword;
26
this.Location = location;
29
public override TextLocation StartLocation {
34
public override TextLocation EndLocation {
36
return new TextLocation (Location.Line, Location.Column + (Keyword != null ? Keyword.Length : 0));
40
public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)
42
return visitor.VisitPrimitiveType(this, data);
45
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
47
PrimitiveType o = other as PrimitiveType;
48
return o != null && MatchString(this.Keyword, o.Keyword);
51
public override string ToString()
53
return Keyword ?? base.ToString();