-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Select Smaller/Larger/Next/Previous Syntax Nodes #105
Merged
LeonMatthesKDAB
merged 8 commits into
KDAB:main
from
LeonMatthesKDAB:64-select-syntax-nodes
Jul 15, 2024
Merged
feat: Select Smaller/Larger/Next/Previous Syntax Nodes #105
LeonMatthesKDAB
merged 8 commits into
KDAB:main
from
LeonMatthesKDAB:64-select-syntax-nodes
Jul 15, 2024
Conversation
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
863eec6
to
76108e8
Compare
narnaud
requested changes
Jul 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, it's actually working nicely.
The previous/next sibling can be really useful for fast scripting.
Small comments, nothing serious.
By moving the project setup into a macro we can save quite a few lines of code.
This allows to navigate the code semantically.
Most functions were the same with only different function name and document type. We can replace those implementations with a macro.
This patch adds functions to select the next/previous syntax node. Combined with the previously added functions to select the larger/smaller syntax node, this allows for very useful semantic code navigation.
This aggregates the counts, which improves the history a lot.
76108e8
to
5c93216
Compare
Use LOG_RETURN in the select*SyntaxNode methods. Add a warning if selectSmallerSyntaxNode doesn't find anything to select.
narnaud
approved these changes
Jul 15, 2024
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.
This allows navigating the code semantically.
Fix #64