Browse Source

fixed goto location.

newNRvisualizers
Mike Krüger 15 years ago
parent
commit
7f141c0d8e
  1. 5
      ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs

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

@ -1459,9 +1459,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1459,9 +1459,10 @@ namespace ICSharpCode.NRefactory.CSharp
var result = new GotoStatement ();
var location = LocationsBag.GetLocations (gotoStatement);
result.AddChild (new CSharpTokenNode (Convert (gotoStatement.loc), "goto".Length), GotoStatement.Roles.Keyword);
result.AddChild (Identifier.Create (gotoStatement.Target, Convert (gotoStatement.loc)), GotoStatement.Roles.Identifier);
var loc = location != null ? Convert (location [0]) : TextLocation.Empty;
result.AddChild (Identifier.Create (gotoStatement.Target, loc), GotoStatement.Roles.Identifier);
if (location != null)
result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), GotoStatement.Roles.Semicolon);
result.AddChild (new CSharpTokenNode (Convert (location [1]), 1), GotoStatement.Roles.Semicolon);
return result;
}

Loading…
Cancel
Save