Browse Source

Fixed parser exception.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
5838210ba7
  1. 3
      ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs

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

@ -318,7 +318,8 @@ namespace ICSharpCode.NRefactory.CSharp
if (loc != null) if (loc != null)
result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.LBracket); result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.LBracket);
string target = optAttributes.First ().ExplicitTarget; var first = optAttributes.FirstOrDefault ();
string target = first != null ? first.ExplicitTarget : null;
if (!string.IsNullOrEmpty (target)) { if (!string.IsNullOrEmpty (target)) {
if (loc != null && pos < loc.Count - 1) { if (loc != null && pos < loc.Count - 1) {

Loading…
Cancel
Save