Browse Source

Fixed SD2-410: Goto definition doesn't work for array types

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@377 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
2a323389a8
  1. 13
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs

13
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs

@ -228,6 +228,19 @@ namespace CSharpBinding.Parser
int otherBracket = SearchBracketForward(inText, i + 1, c, (c == '(') ? ')' : ']'); int otherBracket = SearchBracketForward(inText, i + 1, c, (c == '(') ? ')' : ']');
if (otherBracket < 0) if (otherBracket < 0)
break; break;
if (c == '[') {
// do not include [] when it is an array declaration (versus indexer call)
bool ok = false;
for (int j = i + 1; j < otherBracket; j++) {
if (inText[j] != ',' && !char.IsWhiteSpace(inText, j)) {
ok = true;
break;
}
}
if (!ok) {
break;
}
}
b.Append(inText, i, otherBracket - i + 1); b.Append(inText, i, otherBracket - i + 1);
break; break;
} else if (c == '<') { } else if (c == '<') {

Loading…
Cancel
Save