Browse Source

fixed variable declaration statement inside for loops wrong semicolon

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

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

@ -1081,7 +1081,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1081,7 +1081,7 @@ namespace ICSharpCode.NRefactory.CSharp
result.AddChild (init, VariableDeclarationStatement.Roles.Variable);
}
}
if (location != null)
if (location != null && blockVariableDeclaration.Initializer == null || location.Count > 1)
result.AddChild (new CSharpTokenNode (Convert (location[location.Count - 1]), 1), VariableDeclarationStatement.Roles.Semicolon);
return result;
}

Loading…
Cancel
Save