-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Small tweaks to the recursion walk we do when looking for strign indentation regions #73719
Small tweaks to the recursion walk we do when looking for strign indentation regions #73719
Conversation
@ToddGrun ptal. |
|
||
using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var nodeStack); | ||
nodeStack.Add(root); | ||
|
||
while (nodeStack.TryPop(out var node)) | ||
{ | ||
// DoNot' bother recursing into nodes that don't hit the requested span, they can never contribute | ||
// regions of interest. | ||
if (!node.Span.IntersectsWith(textSpan)) |
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.
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.
Yup! Tackling the ones that show up in traces first
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.
Tiny thing i noticed while looking at traces:
Will also be helped by #73650