Skip to content

Conversation

@podtserkovskiy
Copy link
Contributor

@podtserkovskiy podtserkovskiy commented Oct 7, 2025

Supported enclosing_range for function definitions only.

Introducing additional traversal with ast.PreorderStack, because ast.Walk doesn't allow to access information about enclosing nodes.
The implementation code would be a bit simpler if ast.PreorderStack be used for the main traversal.

For #92

@podtserkovskiy
Copy link
Contributor Author

@jupblb This PR is now ready for the review.

However, I use pre-release version of github.com/sourcegraph/scip. I can update go.mod as soon as a new git tag published.

@jupblb
Copy link
Member

jupblb commented Oct 14, 2025

I've created sourcegraph/scip#344, awaiting review

@jupblb jupblb self-requested a review October 29, 2025 20:02
@podtserkovskiy podtserkovskiy force-pushed the enclosing_ranges_for_functions branch from cbe47ef to ca009fe Compare November 6, 2025 18:14
@podtserkovskiy
Copy link
Contributor Author

I upgraded go.mod as sourcegraph/scip#344 merged

@podtserkovskiy podtserkovskiy force-pushed the enclosing_ranges_for_functions branch from ca009fe to a8c1677 Compare November 6, 2025 18:17
Copy link
Member

@jupblb jupblb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM! Thank you so much for this contribution!! 🎉 Please take a look at two minor comments, I'll try to review further changes ASAP. 😃

@podtserkovskiy podtserkovskiy force-pushed the enclosing_ranges_for_functions branch from a8c1677 to ad6ac1b Compare November 24, 2025 17:31
@podtserkovskiy
Copy link
Contributor Author

I've just applied your suggestions. Sorry for the late reaction, I was traveling 😀

Copy link
Member

@jupblb jupblb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work! 😃

@jupblb jupblb merged commit e21729f into sourcegraph:main Nov 24, 2025
4 checks passed
@podtserkovskiy
Copy link
Contributor Author

Thanks for the review&merge ❤️

@podtserkovskiy podtserkovskiy deleted the enclosing_ranges_for_functions branch November 24, 2025 23:57
@podtserkovskiy podtserkovskiy restored the enclosing_ranges_for_functions branch November 24, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants