Skip to content

Remove SyntaxProtocol.index in favor of index(of:) methods in SyntaxCollection and SyntaxChildren #1919

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

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jul 17, 2023

Make SyntaxProtocol.index internal and index(of:) call the internal index method + validate that the node is actually in the collection (otherwise return nil).

rdar://111944622

@ahoppen
Copy link
Member Author

ahoppen commented Jul 17, 2023

@swift-ci Please test

…ntaxCollection` and `SyntaxChildren`

Make `SyntaxProtocol.index` internal and `index(of:)` call the internal `index` method + validate that the node is actually in the collection (otherwise return `nil`).

rdar://111944622
@ahoppen ahoppen force-pushed the ahoppen/index-in-parent branch from 354f4e9 to e896274 Compare July 17, 2023 21:58
@ahoppen
Copy link
Member Author

ahoppen commented Jul 18, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jul 18, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 9449d61 into swiftlang:main Jul 23, 2023
@ahoppen ahoppen deleted the ahoppen/index-in-parent branch July 23, 2023 03:09
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