Browse Source

[Ast] Renamed named argument expression identifier -> name.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
5dbe3654f5
  1. 8
      ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs
  2. 2
      ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs
  3. 4
      ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs
  4. 4
      ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs
  5. 4
      ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/InvocationExpressionTests.cs
  6. 4
      ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs

8
ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs

@ -32,11 +32,11 @@ namespace ICSharpCode.NRefactory.CSharp @@ -32,11 +32,11 @@ namespace ICSharpCode.NRefactory.CSharp
public NamedArgumentExpression(string identifier, Expression expression)
{
this.Identifier = identifier;
this.Name = identifier;
this.Expression = expression;
}
public string Identifier {
public string Name {
get {
return GetChildByRole (Roles.Identifier).Name;
}
@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
public Identifier IdentifierToken {
public Identifier NameToken {
get {
return GetChildByRole (Roles.Identifier);
}
@ -81,7 +81,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -81,7 +81,7 @@ namespace ICSharpCode.NRefactory.CSharp
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
{
NamedArgumentExpression o = other as NamedArgumentExpression;
return o != null && MatchString(this.Identifier, o.Identifier) && this.Expression.DoMatch(o.Expression, match);
return o != null && MatchString(this.Name, o.Name) && this.Expression.DoMatch(o.Expression, match);
}
}
}

2
ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs

@ -917,7 +917,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -917,7 +917,7 @@ namespace ICSharpCode.NRefactory.CSharp
public void VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression)
{
StartNode(namedArgumentExpression);
namedArgumentExpression.IdentifierToken.AcceptVisitor(this);
namedArgumentExpression.NameToken.AcceptVisitor(this);
WriteToken(Roles.Colon);
Space();
namedArgumentExpression.Expression.AcceptVisitor(this);

4
ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
@ -1535,7 +1535,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1535,7 +1535,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (nae != null) {
if (argumentNames == null)
argumentNames = new string[arguments.Length];
argumentNames[i] = nae.Identifier;
argumentNames[i] = nae.Name;
argumentValue = nae.Expression;
} else {
argumentValue = argument;

4
ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
@ -896,7 +896,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem @@ -896,7 +896,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
if (nae != null) {
if (namedCtorArguments == null)
namedCtorArguments = new List<KeyValuePair<string, IConstantValue>>();
namedCtorArguments.Add(new KeyValuePair<string, IConstantValue>(nae.Identifier, ConvertAttributeArgument(nae.Expression)));
namedCtorArguments.Add(new KeyValuePair<string, IConstantValue>(nae.Name, ConvertAttributeArgument(nae.Expression)));
} else {
NamedExpression namedExpression = expr as NamedExpression;
if (namedExpression != null) {

4
ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/InvocationExpressionTests.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
@ -177,7 +177,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression @@ -177,7 +177,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression
Target = new IdentifierExpression("a"),
Arguments = {
new NamedArgumentExpression {
Identifier = "arg",
Name = "arg",
Expression = new DirectionExpression {
FieldDirection = FieldDirection.Ref,
Expression = new IdentifierExpression("v")

4
ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System;
@ -419,7 +419,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors @@ -419,7 +419,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors
public AstNode VisitNamedArgumentExpression(CSharp.NamedArgumentExpression namedArgumentExpression, object data)
{
Expression expr = new NamedArgumentExpression {
Identifier = namedArgumentExpression.Identifier,
Identifier = namedArgumentExpression.Name,
Expression = (Expression)namedArgumentExpression.Expression.AcceptVisitor(this, data)
};

Loading…
Cancel
Save