Commit Graph

2 Commits

Author SHA1 Message Date
Alex Hoppen
000298cbc7 [Macros] Test adjustment because we no longer trim whitespace from macro expansions
Companion of https://github.com/swiftlang/swift-syntax/pull/2776
2024-08-07 09:14:49 -07:00
Ben Barham
fe2104ca99 [Macros] Automatically format expanded macros
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.
2023-04-27 21:24:46 -07:00