PageRenderTime 25ms CodeModel.GetById 16ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://github.com/icsharpcode/ILSpy
C# | 39 lines | 28 code | 6 blank | 5 comment | 3 complexity | 4173ea2fa0c548cc3fd61488cd5b5748 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;
 5using System.Collections.Generic;
 6
 7namespace ICSharpCode.NRefactory.VB.Ast
 8{
 9	/// <summary>
10	/// Represents a named argument passed to a method or attribute.
11	/// </summary>
12	public class NamedArgumentExpression : Expression
13	{
14		public Identifier Identifier {
15			get { return GetChildByRole(Roles.Identifier); }
16			set { SetChildByRole(Roles.Identifier, value); }
17		}
18		
19		public VBTokenNode AssignToken {
20			get { return GetChildByRole (Roles.Assign); }
21		}
22		
23		public Expression Expression {
24			get { return GetChildByRole (Roles.Expression); }
25			set { SetChildByRole (Roles.Expression, value); }
26		}
27		
28		public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
29		{
30			return visitor.VisitNamedArgumentExpression(this, data);
31		}
32		
33		protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
34		{
35			NamedArgumentExpression o = other as NamedArgumentExpression;
36			return o != null && this.Identifier.DoMatch(o.Identifier, match) && this.Expression.DoMatch(o.Expression, match);
37		}
38	}
39}