mirror of
https://github.com/dlang-community/DCD.git
synced 2025-04-28 06:09:53 +03:00
fix #369, No completion after UDA
This commit is contained in:
parent
7cee649587
commit
07c460c061
4 changed files with 16 additions and 0 deletions
|
@ -1215,6 +1215,13 @@ T getExpression(T)(T beforeTokens)
|
||||||
|
|
||||||
expressionLoop: while (true)
|
expressionLoop: while (true)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (i > 0 && beforeTokens[i].type == tok!"identifier" &&
|
||||||
|
beforeTokens[i-1].type == tok!"@" )
|
||||||
|
{
|
||||||
|
return beforeTokens[0 .. 0];
|
||||||
|
}
|
||||||
|
|
||||||
switch (beforeTokens[i].type)
|
switch (beforeTokens[i].type)
|
||||||
{
|
{
|
||||||
case tok!"import":
|
case tok!"import":
|
||||||
|
|
3
tests/tc051/expected.txt
Normal file
3
tests/tc051/expected.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
identifiers
|
||||||
|
Foo s
|
||||||
|
float k
|
1
tests/tc051/file.d
Normal file
1
tests/tc051/file.d
Normal file
|
@ -0,0 +1 @@
|
||||||
|
enum UDA; struct Foo{} @UDA F
|
5
tests/tc051/run.sh
Executable file
5
tests/tc051/run.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
../../bin/dcd-client $1 file.d -c29 > actual.txt
|
||||||
|
diff actual.txt expected.txt
|
Loading…
Add table
Add a link
Reference in a new issue