Merge pull request #370 from BBasile/issue-369

fix #369, No completion after UDA
This commit is contained in:
Brian Schott 2017-04-05 15:28:15 -07:00 committed by GitHub
commit 1fa55a99b8
4 changed files with 16 additions and 0 deletions

View File

@ -1215,6 +1215,13 @@ T getExpression(T)(T beforeTokens)
expressionLoop: while (true)
{
if (i > 0 && beforeTokens[i].type == tok!"identifier" &&
beforeTokens[i-1].type == tok!"@" )
{
return beforeTokens[0 .. 0];
}
switch (beforeTokens[i].type)
{
case tok!"import":

3
tests/tc051/expected.txt Normal file
View File

@ -0,0 +1,3 @@
identifiers
Foo s
float k

1
tests/tc051/file.d Normal file
View File

@ -0,0 +1 @@
enum UDA; struct Foo{} @UDA F

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

@ -0,0 +1,5 @@
set -e
set -u
../../bin/dcd-client $1 file.d -c29 > actual.txt
diff actual.txt expected.txt