Skip to content

Add tree top method to Syntax node - #22668

Merged
ChayimFriedman2 merged 2 commits into
rust-lang:masterfrom
bit-aloo:2026-06-30-add-tree-top-method
Jun 30, 2026
Merged

Add tree top method to Syntax node#22668
ChayimFriedman2 merged 2 commits into
rust-lang:masterfrom
bit-aloo:2026-06-30-add-tree-top-method

Conversation

@bit-aloo

Copy link
Copy Markdown
Member

This PR adds tree top method to syntax node, to fetch the root, instead of letting the user do that everytime.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 29, 2026
@ChayimFriedman2

Copy link
Copy Markdown
Contributor

I actually prefer this to be a method in rowan (on both SyntaxNode and SyntaxToken), feel free to send a PR there (including bumping the version then I'll release it).

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

Ah and you need to base this on the 0.15 version series, 0.16 has some changes that break us.

@bit-aloo

Copy link
Copy Markdown
Member Author

PR on rowan with version bump: rust-analyzer/rowan#213

@bit-aloo

Copy link
Copy Markdown
Member Author

I will update this PR, once we publish v0.15.19

@bit-aloo
bit-aloo force-pushed the 2026-06-30-add-tree-top-method branch from 19f3036 to eb0a1d9 Compare June 30, 2026 09:21
@bit-aloo
bit-aloo force-pushed the 2026-06-30-add-tree-top-method branch from eb0a1d9 to 489a0ea Compare June 30, 2026 09:28
@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Jun 30, 2026
Merged via the queue into rust-lang:master with commit 5ba849d Jun 30, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 30, 2026
@bit-aloo
bit-aloo deleted the 2026-06-30-add-tree-top-method branch June 30, 2026 11: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.

3 participants