Skip to content

Commit aee75d5

Browse files
committed
format fixes
1 parent cb7a6a0 commit aee75d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ private func expandFreestandingExpr(
132132
/// Adds the appropriate indentation on expanded code even if it's multi line.
133133
/// Makes sure original macro expression's trivia is maintained by adding it to expanded code.
134134
private func adjustIndentationOfFreestandingMacro(expandedCode: String, node: some FreestandingMacroExpansionSyntax) -> String {
135-
135+
136136
if expandedCode.isEmpty {
137137
return expandedCode.wrappingInTrivia(from: node)
138138
}
139-
139+
140140
let indentationOfFirstLine = node.indentationOfFirstLine
141141
let indentLength = indentationOfFirstLine.sourceLength.utf8Length
142-
142+
143143
// we are doing 3 step adjustment here
144144
// step 1: add indentation to each line of expanded code
145145
// step 2: remove indentation from first line of expaned code
146146
// step 3: wrap the expanded code into macro expression's trivia. This trivia will contain appropriate existing
147147
// indentation. Note that if macro expression occurs in middle of the line then there will be no indentation or extra space.
148148
// Hence we are doing step 2
149-
149+
150150
var indentedSource = expandedCode.indented(by: indentationOfFirstLine)
151151
indentedSource.removeFirst(indentLength)
152152
indentedSource = indentedSource.wrappingInTrivia(from: node)

0 commit comments

Comments
 (0)