@@ -292,38 +292,37 @@ let syntaxBaseNodesFiles: [SourceFileSyntax] = {
292
292
293
293
leafProtocolDecl ( type: node. kind. leafProtocolType, inheritedType: node. kind. protocolType)
294
294
leafProtocolExtension ( type: node. kind. leafProtocolType, inheritedType: node. kind. protocolType)
295
-
296
-
297
- try ! ExtensionDeclSyntax (
298
- """
299
- // MARK: - Syntax
300
-
301
- extension Syntax
302
- """
303
- ) {
304
- try VariableDeclSyntax ( " public static var structure: SyntaxNodeStructure " ) {
305
- let choices = ArrayExprSyntax {
295
+ } )
296
+ }
297
+ retVal. append ( SourceFileSyntax ( leadingTrivia: copyrightHeader) {
298
+ try ! ExtensionDeclSyntax (
299
+ """
300
+ // MARK: - Syntax
301
+
302
+ extension Syntax
303
+ """
304
+ ) {
305
+ try VariableDeclSyntax ( " public static var structure: SyntaxNodeStructure " ) {
306
+ let choices = ArrayExprSyntax {
307
+ ArrayElementSyntax (
308
+ leadingTrivia: . newline,
309
+ expression: ExprSyntax ( " .node(TokenSyntax.self) " )
310
+ )
311
+
312
+ for node in NON_BASE_SYNTAX_NODES {
306
313
ArrayElementSyntax (
307
314
leadingTrivia: . newline,
308
- expression: ExprSyntax ( " .node(TokenSyntax .self) " )
315
+ expression: ExprSyntax ( " .node( \( node . kind . syntaxType ) .self) " )
309
316
)
310
-
311
- for node in NON_BASE_SYNTAX_NODES {
312
- ArrayElementSyntax (
313
- leadingTrivia: . newline,
314
- expression: ExprSyntax ( " .node( \( node. kind. syntaxType) .self) " )
315
- )
316
- }
317
317
}
318
-
319
- StmtSyntax ( " return .choices( \( choices) ) " )
320
318
}
321
- }
322
319
323
- leafProtocolDecl ( type: " _LeafSyntaxNodeProtocol " , inheritedType: " SyntaxProtocol " )
324
- leafProtocolExtension ( type: " _LeafSyntaxNodeProtocol " , inheritedType: " SyntaxProtocol " )
325
- } )
326
- }
320
+ StmtSyntax ( " return .choices( \( choices) ) " )
321
+ }
322
+ }
323
+ leafProtocolDecl ( type: " _LeafSyntaxNodeProtocol " , inheritedType: " SyntaxProtocol " )
324
+ leafProtocolExtension ( type: " _LeafSyntaxNodeProtocol " , inheritedType: " SyntaxProtocol " )
325
+ } )
327
326
return retVal
328
327
} ( )
329
328
0 commit comments