Browse Source

Fixed base type comma order.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
60430391f6
  1. 6
      ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs

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

@ -398,7 +398,7 @@ namespace ICSharpCode.NRefactory.CSharp
foreach (var baseTypes in c.TypeBaseExpressions) { foreach (var baseTypes in c.TypeBaseExpressions) {
newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole);
if (commaLocations != null && i < commaLocations.Count) { if (commaLocations != null && i < commaLocations.Count) {
newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i - 1]), 1), TypeDeclaration.Roles.Comma); newType.AddChild (new CSharpTokenNode (Convert (commaLocations [i]), 1), TypeDeclaration.Roles.Comma);
i++; i++;
} }
} }
@ -446,7 +446,7 @@ namespace ICSharpCode.NRefactory.CSharp
foreach (var baseTypes in s.TypeBaseExpressions) { foreach (var baseTypes in s.TypeBaseExpressions) {
newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole);
if (commaLocations != null && i < commaLocations.Count) { if (commaLocations != null && i < commaLocations.Count) {
newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i - 1]), 1), TypeDeclaration.Roles.Comma); newType.AddChild (new CSharpTokenNode (Convert (commaLocations [i]), 1), TypeDeclaration.Roles.Comma);
i++; i++;
} }
} }
@ -493,7 +493,7 @@ namespace ICSharpCode.NRefactory.CSharp
foreach (var baseTypes in i.TypeBaseExpressions) { foreach (var baseTypes in i.TypeBaseExpressions) {
newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole);
if (commaLocations != null && j < commaLocations.Count) { if (commaLocations != null && j < commaLocations.Count) {
newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - j - 1]), 1), TypeDeclaration.Roles.Comma); newType.AddChild (new CSharpTokenNode (Convert (commaLocations [j]), 1), TypeDeclaration.Roles.Comma);
j++; j++;
} }
} }

Loading…
Cancel
Save