PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/NRefactory/ICSharpCode.NRefactory.VB/Ast/Expressions/SimpleNameExpression.cs

http://github.com/icsharpcode/ILSpy
C# | 32 lines | 22 code | 5 blank | 5 comment | 3 complexity | 2eced4ab9dccdba819ecafb737d995b0 MD5 | raw file
 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)
 3
 4using System;
 5
 6namespace ICSharpCode.NRefactory.VB.Ast
 7{
 8	/// <summary>
 9	/// Description of SimpleNameExpression.
10	/// </summary>
11	public class SimpleNameExpression : Expression
12	{
13		public Identifier Identifier { get; set; }
14		
15		public AstNodeCollection<AstType> TypeArguments {
16			get { return GetChildrenByRole(Roles.TypeArgument); }
17		}
18		
19		protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
20		{
21			var node = other as SimpleNameExpression;
22			return node != null
23				&& Identifier.DoMatch(node.Identifier, match)
24				&& TypeArguments.DoMatch(node.TypeArguments, match);
25		}
26		
27		public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
28		{
29			return visitor.VisitSimpleNameExpression(this, data);
30		}
31	}
32}