/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. using System;
  4. namespace ICSharpCode.NRefactory.VB.Ast
  5. {
  6. /// <summary>
  7. /// Description of SimpleNameExpression.
  8. /// </summary>
  9. public class SimpleNameExpression : Expression
  10. {
  11. public Identifier Identifier { get; set; }
  12. public AstNodeCollection<AstType> TypeArguments {
  13. get { return GetChildrenByRole(Roles.TypeArgument); }
  14. }
  15. protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
  16. {
  17. var node = other as SimpleNameExpression;
  18. return node != null
  19. && Identifier.DoMatch(node.Identifier, match)
  20. && TypeArguments.DoMatch(node.TypeArguments, match);
  21. }
  22. public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
  23. {
  24. return visitor.VisitSimpleNameExpression(this, data);
  25. }
  26. }
  27. }