Browse Source

mhutch: [NRefactory] Fix const modifier on fields

newNRvisualizers
Mike Krüger 15 years ago
parent
commit
530cb0bb7b
  1. 2
      ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs

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

@ -610,7 +610,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -610,7 +610,7 @@ namespace ICSharpCode.NRefactory.CSharp
AddAttributeSection (newField, f);
AddModifiers (newField, location);
if (location != null)
newField.AddChild (new CSharpTokenNode (Convert (location[0]), "const".Length), FieldDeclaration.Roles.Keyword);
newField.AddChild (new CSharpModifierToken (Convert (location [0]), Modifiers.Const), AttributedNode.ModifierRole);
newField.AddChild (ConvertToType (f.TypeName), FieldDeclaration.Roles.Type);
VariableInitializer variable = new VariableInitializer ();

Loading…
Cancel
Save