fix #369, No completion after UDA

This commit is contained in:
Basile Burg 2017-03-26 21:08:49 +02:00
parent 7cee649587
commit 07c460c061
No known key found for this signature in database
GPG key ID: 1868039F415CB8CF
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