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

Change parseIncrementally to return a struct instead of a tuple #2267

Closed
ahoppen opened this issue Oct 6, 2023 · 3 comments
Closed

Change parseIncrementally to return a struct instead of a tuple #2267

ahoppen opened this issue Oct 6, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@ahoppen
Copy link
Member

ahoppen commented Oct 6, 2023

From swiftlang/sourcekit-lsp#857 (comment)

Is there a reason Parser.parseIncrementally returns a tuple instead of a dedicated struct? Seems like a single type would be easier to manage, and would help ensure you don't pass a mismatching syntax tree + lookahead ranges to IncrementalParseTransition (and would make it trivial to add any additional state later down the road if needed).

Like with all API changes, we need to see if we can do this in an API-compatible way. I think breaking the API here might be acceptable because the user base of this function should be fairly small, but an API-compatible way would definitely be preferred.

@ahoppen
Copy link
Member Author

ahoppen commented Oct 6, 2023

Tracked in Apple’s issue tracker as rdar://116599711

@kimdv
Copy link
Contributor

kimdv commented Jan 24, 2024

@ahoppen I think this can be closed?

@ahoppen
Copy link
Member Author

ahoppen commented Jan 24, 2024

Oh, yes it can. Thanks for noticing.

@ahoppen ahoppen closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants