Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve ptr, array & aa in types, add typeOf field
typeOf field is new tab-delimited field in dcd-client output, so you no longer need to manually guess types / parse code. Calltips still yield the actual written type, but in case of "auto", the typeOf column may contain more useful info.
- Loading branch information
1 parent
690d625
commit 22f65d5
Showing
19 changed files
with
151 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
identifiers | ||
libraryFunction f Tuple!long libraryFunction(string s, string s2) stdin 190 foobar | ||
libraryFunction f int* libraryFunction(string s) stdin 99 Hello\nWorld | ||
libraryVariable v int libraryVariable stdin 56 My variable | ||
libraryFunction f Tuple!long libraryFunction(string s, string s2) stdin 223 foobar | ||
libraryFunction f int* libraryFunction(string s) stdin 132 Hello\nWorld int* | ||
libraryVariable v int libraryVariable stdin 56 My variable int | ||
libraryVariable2 v int* libraryVariable2 stdin 88 My variable int* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
calltips | ||
libraryFunction Tuple!long libraryFunction(string s, string s2) stdin 166 foobar | ||
libraryFunction int* libraryFunction(string s) stdin 75 Hello\nWorld | ||
libraryFunction Tuple!long libraryFunction(string s, string s2) stdin 166 foobar | ||
libraryFunction int* libraryFunction(string s) stdin 75 Hello\nWorld int* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
identifiers | ||
foo f void foo() stdin 26 my documentation | ||
foo f void foo(int i) stdin 49 my documentation | ||
foo f void foo() stdin 26 my documentation void | ||
foo f void foo(int i) stdin 49 my documentation void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
identifiers | ||
bar v foo bar stdin 92 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// my documentation | ||
struct S | ||
{ | ||
T foo(T)() { return T.init; } | ||
} | ||
|
||
void test() | ||
{ | ||
S s; | ||
auto bar = s.foo!int(); | ||
bar | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set -e | ||
set -u | ||
|
||
../../bin/dcd-client $1 file.d -x -c115 > actual1.txt | ||
diff actual1.txt expected1.txt --strip-trailing-cr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
identifiers | ||
itemA v S itemA stdin 44 S | ||
itemB v S* itemB stdin 55 S* | ||
itemC v S[]* itemC stdin 68 S[]* | ||
itemD v S[][]* itemD stdin 83 S[][]* | ||
itemE v S[][]*[] itemE stdin 100 S[][]*[] | ||
itemF v S[][]*[][] itemF stdin 119 S[][]*[][] | ||
itemG v S[][...]*[][] itemG stdin 141 S[][...]*[][] | ||
itemH v S[][]*[...][] itemH stdin 163 S[][]*[...][] | ||
itemI v S[...][]*[...][] itemI stdin 188 S[...][]*[...][] | ||
itemJ v S[...]*[]*[...][] itemJ stdin 214 S[...]*[]*[...][] | ||
itemK v S[...]*[]**[...][] itemK stdin 241 S[...]*[]**[...][] | ||
itemL v S[...]*[]*[...]*[] itemL stdin 268 S[...]*[]*[...]*[] | ||
itemM v S[...]*[]*[...]*[]* itemM stdin 296 S[...]*[]*[...]*[]* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
struct S | ||
{ | ||
int member; | ||
} | ||
|
||
void test() | ||
{ | ||
S itemA; | ||
S* itemB; | ||
S[]* itemC; | ||
S[][]* itemD; | ||
S[][]*[] itemE; | ||
S[][]*[][] itemF; | ||
S[][int]*[][] itemG; | ||
S[][]*[int][] itemH; | ||
S[int][]*[int][] itemI; | ||
S[int]*[]*[int][] itemJ; | ||
S[int]*[]**[int][] itemK; | ||
S[int]*[]*[int]*[] itemL; | ||
S[int]*[]*[int]*[]* itemM; | ||
|
||
item | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set -e | ||
set -u | ||
|
||
../../bin/dcd-client $1 file.d -x -c309 > actual1.txt | ||
diff actual1.txt expected1.txt --strip-trailing-cr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters