Browse Source

Use "Role" suffix for the fixed field variable role.

newNRvisualizers
Daniel Grunwald 15 years ago
parent
commit
56fde51b69
  1. 6
      ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs
  2. 4
      ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs

6
ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs

@ -1,4 +1,4 @@
// //
// FixedFieldDeclaration.cs // FixedFieldDeclaration.cs
// //
// Author: // Author:
@ -29,7 +29,7 @@ namespace ICSharpCode.NRefactory.CSharp
{ {
public class FixedFieldDeclaration : AttributedNode public class FixedFieldDeclaration : AttributedNode
{ {
public static readonly Role<FixedVariableInitializer> Initializer = new Role<FixedVariableInitializer> ("Initializer"); public static readonly Role<FixedVariableInitializer> VariableRole = new Role<FixedVariableInitializer> ("FixedVariable");
public override NodeType NodeType { public override NodeType NodeType {
get { return NodeType.Member; } get { return NodeType.Member; }
@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp
} }
public AstNodeCollection<FixedVariableInitializer> Variables { public AstNodeCollection<FixedVariableInitializer> Variables {
get { return GetChildrenByRole (Initializer); } get { return GetChildrenByRole (VariableRole); }
} }
public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data) public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)

4
ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs

@ -418,7 +418,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (bracketLocations != null && bracketLocations.Count > 1) if (bracketLocations != null && bracketLocations.Count > 1)
variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket); variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket);
} }
newField.AddChild (variable, FixedFieldDeclaration.Initializer); newField.AddChild (variable, FixedFieldDeclaration.VariableRole);
if (f.Declarators != null) { if (f.Declarators != null) {
foreach (var decl in f.Declarators) { foreach (var decl in f.Declarators) {
@ -436,7 +436,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (bracketLocations != null && bracketLocations.Count > 1) if (bracketLocations != null && bracketLocations.Count > 1)
variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket); variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket);
} }
newField.AddChild (variable, FixedFieldDeclaration.Initializer); newField.AddChild (variable, FixedFieldDeclaration.VariableRole);
} }
} }
if (location != null) if (location != null)

Loading…
Cancel
Save