Permalink
Browse files

Renamed named expression identifier -> name.

  • Loading branch information...
1 parent 5dbe365 commit 063d0f569c3e69922cd9452ee5d8e004d1f1d50f @mkrueger mkrueger committed Apr 18, 2012
@@ -30,9 +30,9 @@ public NamedArgumentExpression()
{
}
- public NamedArgumentExpression(string identifier, Expression expression)
+ public NamedArgumentExpression(string name, Expression expression)
{
- this.Name = identifier;
+ this.Name = name;
this.Expression = expression;
}
@@ -40,13 +40,13 @@ public NamedExpression()
{
}
- public NamedExpression (string identifier, Expression expression)
+ public NamedExpression (string name, Expression expression)
{
- this.Identifier = identifier;
+ this.Name = name;
this.Expression = expression;
}
- public string Identifier {
+ public string Name {
get {
return GetChildByRole (Roles.Identifier).Name;
}
@@ -55,7 +55,7 @@ public NamedExpression (string identifier, Expression expression)
}
}
- public Identifier IdentifierToken {
+ public Identifier NameToken {
get {
return GetChildByRole (Roles.Identifier);
}
@@ -91,7 +91,7 @@ public override T AcceptVisitor<T> (IAstVisitor<T> visitor)
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
{
var o = other as NamedExpression;
- 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);
}
}
}
@@ -927,7 +927,7 @@ public void VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentEx
public void VisitNamedExpression(NamedExpression namedExpression)
{
StartNode(namedExpression);
- namedExpression.IdentifierToken.AcceptVisitor(this);
+ namedExpression.NameToken.AcceptVisitor(this);
Space();
WriteToken(Roles.Assign);
Space();
@@ -635,7 +635,7 @@ CodeAttributeDeclaration Convert(Attribute attribute)
foreach (Expression expr in attribute.Arguments) {
NamedExpression ne = expr as NamedExpression;
if (ne != null)
- attr.Arguments.Add(new CodeAttributeArgument(ne.Identifier, Convert(ne.Expression)));
+ attr.Arguments.Add(new CodeAttributeArgument(ne.Name, Convert(ne.Expression)));
else
attr.Arguments.Add(new CodeAttributeArgument(Convert(expr)));
}
@@ -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
@@ -535,7 +535,7 @@ internal override bool CanMatch(AstNode node)
NamedExpression ne = node as NamedExpression;
if (ne != null)
- return ne.Identifier == searchTerm;
+ return ne.Name == searchTerm;
return false;
}
@@ -962,7 +962,7 @@ static string GetAnonymousTypePropertyName(Expression expr, out Expression resol
if (expr is NamedExpression) {
var namedArgExpr = (NamedExpression)expr;
resolveExpr = namedArgExpr.Expression;
- return namedArgExpr.Identifier;
+ return namedArgExpr.Name;
}
// no name given, so it's a projection initializer
if (expr is MemberReferenceExpression) {
@@ -1287,7 +1287,7 @@ void HandleNamedExpression(NamedExpression namedExpression, List<ResolveResult>
{
StoreCurrentState(namedExpression);
Expression rhs = namedExpression.Expression;
- ResolveResult lhsRR = resolver.ResolveIdentifierInObjectInitializer(namedExpression.Identifier);
+ ResolveResult lhsRR = resolver.ResolveIdentifierInObjectInitializer(namedExpression.Name);
if (rhs is ArrayInitializerExpression) {
HandleObjectInitializer(lhsRR, (ArrayInitializerExpression)rhs, initializerStatements);
} else {
@@ -900,7 +900,7 @@ CSharpAttribute ConvertAttribute(CSharp.Attribute attr)
} else {
NamedExpression namedExpression = expr as NamedExpression;
if (namedExpression != null) {
- string name = namedExpression.Identifier;
+ string name = namedExpression.Name;
if (namedArguments == null)
namedArguments = new List<KeyValuePair<string, IConstantValue>>();
namedArguments.Add(new KeyValuePair<string, IConstantValue>(name, ConvertAttributeArgument(namedExpression.Expression)));
@@ -430,7 +430,7 @@ public AstNode VisitNamedExpression(CSharp.NamedExpression namedExpression, obje
{
Expression expr = new FieldInitializerExpression {
IsKey = true,
- Identifier = namedExpression.Identifier,
+ Identifier = namedExpression.Name,
Expression = (Expression)namedExpression.Expression.AcceptVisitor(this, data)
};
return EndNode(namedExpression, expr);

0 comments on commit 063d0f5

Please sign in to comment.