Properly construct a callTip for pointers and symbols with breadcrumbs (T, [], *, etc)#175
Closed
RUSShyTwo wants to merge 4 commits intodlang-community:masterfrom
RUSShyTwo:patch-1
Closed
Properly construct a callTip for pointers and symbols with breadcrumbs (T, [], *, etc)#175RUSShyTwo wants to merge 4 commits intodlang-community:masterfrom RUSShyTwo:patch-1
RUSShyTwo wants to merge 4 commits intodlang-community:masterfrom
RUSShyTwo:patch-1
Conversation
This was referenced Dec 5, 2021
WebFreak001
reviewed
Dec 5, 2021
Comment on lines
+327
to
+362
| auto c = callTip[index]; | ||
| if (c == '*') | ||
| isPtr = true; | ||
| else | ||
| { | ||
| if ((c == ')') && isPtr) | ||
| { | ||
| break; | ||
| } | ||
| else if (c == ']' && isPtr) | ||
| { | ||
| if (c > 1) | ||
| { | ||
| // TODO: if we ever put the length for static array | ||
| // this will need to be updated to support that | ||
| if(callTip[index -1] == '[') | ||
| { | ||
| ptrArray = true; | ||
| break; | ||
| } | ||
|
|
||
| // TODO: if we ever put the type name for AA | ||
| // this will need to be updated to support that | ||
| if(callTip[index -1] == '.') | ||
| { | ||
| ptrAA = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| else | ||
| { | ||
| ptrType = true; | ||
| break; | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
mixed whitespaces with tabs here
Author
|
literally nobody other than WebFreak001 care about this project this is very sad and disappointing, what D people are doing? they busy programming in Java? |
Member
|
can you add tests? this is a non-trivial change and tests always also help convey what the PR is meant to fulfill or not fulfill for other reviewers + helps the feature stay working across later changes. |
WebFreak001
reviewed
Jan 18, 2022
| bool ptrAA = false; | ||
|
|
||
| auto index = callTip.length; | ||
| while(index--) |
Member
There was a problem hiding this comment.
wouldn't it be better to iterate over the breadcrumbs (maybe make a copy) instead of iterating over the characters for stability?
Member
|
moved to dlang-community/DCD#680 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The is the continuation of my previous PR that i closed from my old account
This properly handles pointers, they show the Type with the star! finally!
This also properly creates the callTip for arrays, they show as Type[], not more arr