[GH-ISSUE #83] Refactor: (usize, usize) -> Position, start_position: Position and end_position: Position -> Span #52

Closed
opened 2026-03-07 19:41:20 +03:00 by kerem · 0 comments
Owner

Originally created by @mschlaipfer on GitHub (Dec 17, 2025).
Original GitHub issue: https://github.com/awslabs/iam-policy-autopilot/issues/83

Originally assigned to: @mschlaipfer on GitHub.

We have multiple occurrences of usize pairs, and structs which have both a start_position and an end_position with .0 and .1 calls. We should clean these up to make the code more readable. We currently modify the 0-indexed positions provided by TreeSitter in various places throughout the code base. It would be nicer if we stored them as-is, and have a 1-indexed view on the Position struct (and if we need it a 0-indexed one).

Originally created by @mschlaipfer on GitHub (Dec 17, 2025). Original GitHub issue: https://github.com/awslabs/iam-policy-autopilot/issues/83 Originally assigned to: @mschlaipfer on GitHub. We have multiple occurrences of `usize` pairs, and structs which have both a `start_position` and an `end_position` with `.0` and `.1` calls. We should clean these up to make the code more readable. We currently modify the 0-indexed positions provided by TreeSitter in various places throughout the code base. It would be nicer if we stored them as-is, and have a 1-indexed view on the `Position` struct (and if we need it a 0-indexed one).
kerem 2026-03-07 19:41:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/iam-policy-autopilot#52
No description provided.