Skip to content

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

Closed
@ahoppen

Description

@ahoppen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions