Skip to content

Commit d98d1fe

Browse files
committed
Add support for async macro expansion
1 parent 6f4cc1d commit d98d1fe

File tree

13 files changed

+5447
-82
lines changed

13 files changed

+5447
-82
lines changed

‎CodeGeneration/Sources/generate-swift-syntax/GenerateSwiftSyntax.swift‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ private let swiftParserGeneratedDir = ["SwiftParser", generatedDirName]
2626
privateletswiftParserDiagnosticsGeneratedDir=["SwiftParserDiagnostics", generatedDirName]
2727
privateletswiftSyntaxGeneratedDir=["SwiftSyntax", generatedDirName]
2828
privateletswiftSyntaxBuilderGeneratedDir=["SwiftSyntaxBuilder", generatedDirName]
29+
privateletswiftSyntaxMacroExpansionGeneratedDir=["SwiftSyntaxMacroExpansion", generatedDirName]
30+
privateletswiftSyntaxMacrosGenericTestSupportGeneratedDir=["SwiftSyntaxMacrosGenericTestSupport", generatedDirName]
31+
privateletswiftSyntaxMacrosTestSupportGeneratedDir=["SwiftSyntaxMacrosTestSupport", generatedDirName]
2932
privateletBASE_KIND_FILES:[SyntaxNodeKind:String]=[
3033
.decl:"SyntaxDeclNodes.swift",
3134
.expr:"SyntaxExprNodes.swift",
@@ -160,6 +163,28 @@ struct GenerateSwiftSyntax: AsyncParsableCommand{
160163
swiftSyntaxBuilderGeneratedDir +["RenamedChildrenBuilderCompatibility.swift"],
161164
renamedChildrenBuilderCompatibilityFile
162165
),
166+
167+
// SwiftSyntaxMacroExpansion
168+
GeneratedFileSpec(
169+
swiftSyntaxMacroExpansionGeneratedDir +["MacroExpansion.swift"],
170+
macroExpansionFile
171+
),
172+
GeneratedFileSpec(
173+
swiftSyntaxMacroExpansionGeneratedDir +["MacroSystem.swift"],
174+
macroSystemFile
175+
),
176+
177+
// SwiftSyntaxMacrosGenericTestSupport
178+
GeneratedFileSpec(
179+
swiftSyntaxMacrosGenericTestSupportGeneratedDir +["Assertions.swift"],
180+
genericMacroAssertionsFile
181+
),
182+
183+
// SwiftSyntaxMacrosTestSupport
184+
GeneratedFileSpec(
185+
swiftSyntaxMacrosTestSupportGeneratedDir +["Assertions.swift"],
186+
macroAssertionsFile
187+
),
163188
]
164189
// This split of letters produces files for the syntax nodes that have about equal size, which improves compile time
165190

0 commit comments

Comments
(0)