Autocomplete extern(...) declarations
This commit is contained in:
parent
1f3042424c
commit
29178522d3
|
|
@ -72,6 +72,14 @@ AutocompleteResponse complete(AutocompleteRequest request, string[] importPaths)
|
|||
response.completions ~= versions[i];
|
||||
response.completionKinds ~= CompletionKind.keyword;
|
||||
}
|
||||
break;
|
||||
case TokenType.extern_:
|
||||
response.completionType = CompletionType.identifiers;
|
||||
for (size_t i = 0; i < linkages.length; i++)
|
||||
{
|
||||
response.completions ~= linkages[i];
|
||||
response.completionKinds ~= CompletionKind.keyword;
|
||||
}
|
||||
break;
|
||||
case TokenType.pragma_:
|
||||
response.completionType = CompletionType.identifiers;
|
||||
|
|
|
|||
12
constants.d
12
constants.d
|
|
@ -29,6 +29,18 @@ immutable string[] pragmas = [
|
|||
"startaddress"
|
||||
];
|
||||
|
||||
/**
|
||||
* Linkage types
|
||||
*/
|
||||
immutable string[] linkages = [
|
||||
"C",
|
||||
"C++",
|
||||
"D",
|
||||
"Pascal",
|
||||
"System",
|
||||
"Windows",
|
||||
];
|
||||
|
||||
/**
|
||||
* Traits arguments
|
||||
*/
|
||||
|
|
|
|||
3
server.d
3
server.d
|
|
@ -27,7 +27,7 @@ import msgpack;
|
|||
import messages;
|
||||
import autocomplete;
|
||||
|
||||
void main(string[] args)
|
||||
int main(string[] args)
|
||||
{
|
||||
ushort port = 9166;
|
||||
bool help;
|
||||
|
|
@ -85,6 +85,7 @@ void main(string[] args)
|
|||
assert(s.send(responseBytes) == responseBytes.length);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void printHelp(string programName)
|
||||
|
|
|
|||
Loading…
Reference in New Issue