From 144cc4ed4133540d5017c5f1598cafb3df5766f5 Mon Sep 17 00:00:00 2001 From: BBasile Date: Sun, 13 Jan 2019 09:44:25 +0100 Subject: [PATCH] allow completion of tempalte parameter standard properties (#575) allow completion of template parameter standard properties merged-on-behalf-of: BBasile --- README.md | 2 ++ dsymbol | 2 +- dub.json | 2 +- tests/tc027/expected1.txt | 2 +- tests/tc048/expected.txt | 2 +- tests/tc_template_param_props/expected1.txt | 4 ++++ tests/tc_template_param_props/expected2.txt | 6 ++++++ tests/tc_template_param_props/file.d | 1 + tests/tc_template_param_props/run.sh | 8 ++++++++ 9 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 tests/tc_template_param_props/expected1.txt create mode 100644 tests/tc_template_param_props/expected2.txt create mode 100644 tests/tc_template_param_props/file.d create mode 100755 tests/tc_template_param_props/run.sh diff --git a/README.md b/README.md index b4d1a8c..e2c65a6 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,8 @@ tab character, followed by a completion kind * l - alias name * t - template name * T - mixin template name +* h - template type parameter (when no colon constraint) +* p - template variadic parameter #### Example output diff --git a/dsymbol b/dsymbol index 4606b16..3da6fb9 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit 4606b1608e77af7df58e5d03e18327f623ec25e9 +Subproject commit 3da6fb97664f3e0156f62f2f8bd21de3b54ccefc diff --git a/dub.json b/dub.json index e9b91d6..96da85e 100644 --- a/dub.json +++ b/dub.json @@ -7,7 +7,7 @@ ], "license": "GPL-3.0", "dependencies": { - "dsymbol": "~>0.5.7", + "dsymbol": "~>0.6.0", "libdparse": "~>0.10.10", "msgpack-d": "~>1.0.0-beta.7", "stdx-allocator": "~>2.77.5" diff --git a/tests/tc027/expected1.txt b/tests/tc027/expected1.txt index a1254f5..3ce878f 100644 --- a/tests/tc027/expected1.txt +++ b/tests/tc027/expected1.txt @@ -1,5 +1,5 @@ identifiers -C l +C h alignof k i v init k diff --git a/tests/tc048/expected.txt b/tests/tc048/expected.txt index 090f064..9a6b9df 100644 --- a/tests/tc048/expected.txt +++ b/tests/tc048/expected.txt @@ -1,5 +1,5 @@ identifiers -T l +T h alignof k bar f init k diff --git a/tests/tc_template_param_props/expected1.txt b/tests/tc_template_param_props/expected1.txt new file mode 100644 index 0000000..012e355 --- /dev/null +++ b/tests/tc_template_param_props/expected1.txt @@ -0,0 +1,4 @@ +identifiers +init k +length k +stringof k diff --git a/tests/tc_template_param_props/expected2.txt b/tests/tc_template_param_props/expected2.txt new file mode 100644 index 0000000..0be402c --- /dev/null +++ b/tests/tc_template_param_props/expected2.txt @@ -0,0 +1,6 @@ +identifiers +alignof k +init k +mangleof k +sizeof k +stringof k diff --git a/tests/tc_template_param_props/file.d b/tests/tc_template_param_props/file.d new file mode 100644 index 0000000..b81cb81 --- /dev/null +++ b/tests/tc_template_param_props/file.d @@ -0,0 +1 @@ +struct Foo(T...){T.} struct Bar(T){T.} diff --git a/tests/tc_template_param_props/run.sh b/tests/tc_template_param_props/run.sh new file mode 100755 index 0000000..63523e5 --- /dev/null +++ b/tests/tc_template_param_props/run.sh @@ -0,0 +1,8 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d -c19 > actual1.txt +diff actual1.txt expected1.txt + +../../bin/dcd-client $1 file.d -c37 > actual2.txt +diff actual2.txt expected2.txt