I'm making a macro to generate default implementations for protocols, and I want them to come out on a single line, but SwiftSyntax insists on adding more space.
For example, it turns this:
var x: Int { 0 }
into this (including the extra space after Int
):
var x: Int {
0
}
I've tried going through the generated nodes and clearing out the trivia, but it doesn't seem to have any effect. How do I get more control over the generated white space?