Updated syntax of function arguments for completions to match that used by clang.

This commit is contained in:
John Maschmeyer 2012-10-17 18:53:19 -05:00
parent 327f5f5af2
commit ad273ea869
1 changed files with 6 additions and 4 deletions

10
types.d
View File

@ -745,18 +745,20 @@ private:
string getFunctionType(Function f) { string getFunctionType(Function f) {
string result = "f"; string result = "f";
if (extendedFunctionTypes) { if (extendedFunctionTypes) {
result ~= "::"; result ~= " : ";
result ~= "[#" ~ f.returnType ~ "#]";
result ~= f.name ~ "(";
bool first = true; bool first = true;
foreach (param; f.parameters) { foreach (param; f.parameters) {
if (first) { if (first) {
first = false; first = false;
} }
else { else {
result ~= "::"; result ~= ",";
} }
result ~= param.type ~ " " ~ param.name; result ~= "<#" ~ param.type ~ " " ~ param.name ~ "#>";
} }
result ~= "::"; result ~= ")";
} }
return result; return result;
} }