adapt to dsymbol changes

This commit is contained in:
WebFreak001 2018-12-29 18:47:39 +01:00
parent 80be02adb3
commit d2123f9e48
4 changed files with 18 additions and 10 deletions

View File

@ -53,16 +53,7 @@ public AutocompleteResponse getDoc(const AutocompleteRequest request,
warning("Could not find symbol");
else
{
bool isDitto(string s)
{
import std.uni : icmp;
if (s.length > 5)
return false;
else
return s.icmp("ditto") == 0;
}
foreach(ref symbol; stuff.symbols.filter!(a => !a.doc.empty && !isDitto(a.doc)))
foreach(ref symbol; stuff.symbols.filter!(a => !a.doc.empty && !a.doc.ditto))
{
AutocompleteResponse.Completion c;
c.documentation = symbol.doc;

View File

@ -0,0 +1,3 @@
identifiers
foo f void foo() stdin 26 my documentation
foo f void foo(int i) stdin 49 my documentation

View File

@ -0,0 +1,9 @@
/// my documentation
void foo(){}
/// ditto
void foo(int i){}
void test()
{
fo
}

5
tests/tc_extended_ditto/run.sh Executable file
View File

@ -0,0 +1,5 @@
set -e
set -u
../../bin/dcd-client $1 file.d -x -c80 > actual1.txt
diff actual1.txt expected1.txt