Generate location() accessor for each node type#74
Merged
alexcrocha merged 1 commit intoar-rust-rbs-buildfrom Dec 18, 2025
Merged
Conversation
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merged
Base automatically changed from
12-12-generate_child_node_traversal_in_visitor_functions
to
ar-rust-rbs-build
December 18, 2025 00:46
6caa232 to
5ceabb3
Compare
st0012
approved these changes
Dec 18, 2025
| pointer: *const rbs_location_t, | ||
| #[allow(dead_code)] | ||
| parser: *mut rbs_parser_t, | ||
| pointer: *const rbs_location_t, |
Member
There was a problem hiding this comment.
Is this positional change required for the function? Or it's just cosmetic
Author
There was a problem hiding this comment.
Just cosmetic.
I have been wanting to a code clean up PR for a while. And since I am working with RBSLocation here, I decided to standardize right away.
Author
There was a problem hiding this comment.
Ended up removing it altogether as it's not needed, as per feedback below.
vinistock
approved these changes
Dec 18, 2025
Each node already has location data in its C struct, but it wasn't exposed through the Rust API. This adds a generated `location()` method to every node type, making it easy to get source ranges for any part of the AST. Also reorders RBSLocation and RBSLocationList struct fields to consistently put parser first, matching the pattern used elsewhere.
5ceabb3 to
534f907
Compare
vinistock
approved these changes
Dec 18, 2025
alexcrocha
added a commit
that referenced
this pull request
Jan 13, 2026
Each node already has location data in its C struct, but it wasn't exposed through the Rust API. This adds a generated `location()` method to every node type, making it easy to get source ranges for any part of the AST. Also removing `parser` from location structs as it is not needed.
alexcrocha
added a commit
that referenced
this pull request
Jan 13, 2026
Each node already has location data in its C struct, but it wasn't exposed through the Rust API. This adds a generated `location()` method to every node type, making it easy to get source ranges for any part of the AST. Also removing `parser` from location structs as it is not needed.
alexcrocha
added a commit
that referenced
this pull request
Jan 14, 2026
Each node already has location data in its C struct, but it wasn't exposed through the Rust API. This adds a generated `location()` method to every node type, making it easy to get source ranges for any part of the AST. Also removing `parser` from location structs as it is not needed.
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.

Each node already has location data in its C struct, but it wasn't exposed through the Rust API. This adds a generated
location()method to every node type, making it easy to get source ranges for any part of the AST.Also removing
parserfrom location structs as it is not needed.