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

Refactor modifier formatting to remove string passing. #4418

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Oct 17, 2024

I'm taking the approach of making DiagnosticBase an API so that we can pass similar diagnostics as parameters. An alternative would be to do the function_ref approach we've done elsewhere, but these felt more boilerplate to me.

Note I'm also modifying messages here. Let me know if you'd like different changes and/or just keeping current formatting (keeping current formatting would also allow removing some of the templating I've added, but it felt helpful putting explicit tokens where possible). But also, things like "protected not allowed on interface declaration at file scope" were part of the phrasing issue, I think.

@jonmeow jonmeow requested a review from zygoloid October 17, 2024 00:09
@jonmeow jonmeow removed the request for review from geoffromer October 17, 2024 00:10
toolchain/check/modifiers.cpp Outdated Show resolved Hide resolved
@jonmeow jonmeow added this pull request to the merge queue Oct 17, 2024
Merged via the queue into carbon-language:trunk with commit b5a837a Oct 17, 2024
8 checks passed
@jonmeow jonmeow deleted the modifier-formatting branch October 17, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants