Skip to content
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

[SR-8044] SwiftSyntax: rename absolute position API #50577

Open
nkcsgexi opened this issue Jun 19, 2018 · 1 comment
Open

[SR-8044] SwiftSyntax: rename absolute position API #50577

nkcsgexi opened this issue Jun 19, 2018 · 1 comment
Labels

Comments

@nkcsgexi
Copy link
Member

Previous ID SR-8044
Radar None
Original Reporter @nkcsgexi
Type Task
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Task
Assignee None
Priority Medium

md5: 85fe6c6e9102c28ceb94f9faf1f8dff1

Issue Description:

For each syntax node, we have two APIs to get the absolute location of that node, which are `position` and `positionAfterSkippingLeadingTrivia`. However, in practice, the verbose name is used more frequently than the shorter one. We should rename `position` to `positionWithoutSkippingLeadingTrivia`, and rename `positionAfterSkippingLeadingTrivia` to `position`

@nathawes
Copy link
Collaborator

We should do the same for byteSize/byteSizeAfterTrimmingTrivia too, so they match up, i.e.

.position and .byteSize both don't include trivia, and

.positionIncludingTrivia and .byteSizeIncludingTrivia (or similar) do.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants