-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Macros] Automatically format expanded macros #65450
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
Conversation
980e45e
to
a3242ce
Compare
@swift-ci please test |
a3242ce
to
ee30220
Compare
Random fly-by that I love this :-) ❤️ |
ee30220
to
07f7857
Compare
Heh, thanks :). Just to set expectations - this is in no way meant to be a complete format. It's mostly just to avoid having to manually add eg. required spaces. Basic indentation isn't too bad on top of that, so that's in there too. |
Yeah that's already quite helpful :) Looks good! |
@swift-ci please test |
07f7857
to
8304410
Compare
@swift-ci please test |
Rather than requiring macro implementations to add required whitespace and indentation, basic format all macro expansions. Right now this uses the default four space indentation, we can consider having that inferred later. Macros can opt-out of automatic formatting by implementing `formatMode` and setting it to `.disabled`. Also moves the extra newlines before/after expansions to a new "Inline Macro" refactoring. Resolves rdar://107731047.
8304410
to
fe2104c
Compare
@swift-ci please test |
Rather than requiring macro implementations to add required whitespace and indentation, basic format all macro expansions. Right now this uses the default four space indentation, we can consider having that inferred later. Macros can opt-out of automatic formatting by implementing
formatMode
and setting it to.disabled
.Also moves the extra newlines before/after expansions to a new "Inline Macro" refactoring.
Resolves rdar://107731047.