Skip to content

[DRAFT] Migrate format parsers to UTF8Span #1370

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

milseman
Copy link
Member

This might be better understood by looking at the 3 commits individually (otherwise it's a big diff).

First commit gets us out of passing down the original String value all the way through for the purposes of diagnostics.

Second commit untangles all diagnostic code from the low-level scanner/lexer style code, while keeping the behavior and basic code structure unchanged. This shows us the basic patterns that we could surface as API on our Span-like types and should spark some interesting designs and discussions.

Third commit just migrates over to UTF8Span, albeit via a guard #available else { fatalError() } pattern. Not sure if that's the way we want to go.

Note that I haven't tested this fully yet.

@milseman milseman changed the title [DRAFT] Migrate to UTF8Span [DRAFT] Migrate format parsers to UTF8Span Jun 19, 2025
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.

1 participant