Skip to content

Commit d1716e6

Browse files
committed
[ASTGen] Define asMacroExpansionExpr here to break link with swift-syntax PR
1 parent 8d92f11 commit d1716e6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

lib/ASTGen/Sources/ASTGen/Macros.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,29 @@ fileprivate struct ThrownErrorDiagnostic: DiagnosticMessage {
117117
}
118118
}
119119

120+
extension MacroExpansionDeclSyntax {
121+
func asMacroExpansionExpr() -> MacroExpansionExprSyntax {
122+
MacroExpansionExprSyntax(
123+
unexpectedBeforePoundToken,
124+
poundToken: poundToken,
125+
unexpectedBetweenPoundTokenAndMacro,
126+
macro: macro,
127+
genericArguments: genericArguments,
128+
unexpectedBetweenGenericArgumentsAndLeftParen,
129+
leftParen: leftParen,
130+
unexpectedBetweenLeftParenAndArgumentList,
131+
argumentList: argumentList,
132+
unexpectedBetweenArgumentListAndRightParen,
133+
rightParen: rightParen,
134+
unexpectedBetweenRightParenAndTrailingClosure,
135+
trailingClosure: trailingClosure,
136+
unexpectedBetweenTrailingClosureAndAdditionalTrailingClosures,
137+
additionalTrailingClosures: additionalTrailingClosures,
138+
unexpectedAfterAdditionalTrailingClosures
139+
)
140+
}
141+
}
142+
120143
@_cdecl("swift_ASTGen_evaluateMacro")
121144
@usableFromInline
122145
func evaluateMacro(

0 commit comments

Comments
 (0)