Skip to content

Commit f759bd4

Browse files
authored
Merge pull request #31 from apple/jgrynspan/113853493-drop-trivia
Do not re-add leading/trailing trivia when expanding condition macros.
2 parents 539bd7e + 5b744ab commit f759bd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/TestingMacros/ConditionMacro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ extension _ConditionMacro {
137137
// Construct and return the call to __check().
138138
let call: ExprSyntax = "Testing.\(expandedFunctionName)(\(LabeledExprListSyntax(checkArguments)))"
139139
if isThrowing {
140-
return "\(raw: macro.leadingTrivia)\(call).__required()\(raw: macro.trailingTrivia)"
140+
return "\(call).__required()"
141141
}
142-
return "\(raw: macro.leadingTrivia)\(call).__expected()\(raw: macro.trailingTrivia)"
142+
return "\(call).__expected()"
143143
}
144144

145145
/// Get the complete argument list for a given macro, including any trailing

0 commit comments

Comments
 (0)