@@ -71,7 +71,7 @@ public extension HasTrailingCodeBlock where Self: StmtSyntaxProtocol {
71
71
init ( _ header: SyntaxNodeString , @CodeBlockItemListBuilder bodyBuilder: ( ) throws -> CodeBlockItemListSyntax ) throws {
72
72
let stmt = StmtSyntax ( " \( header) {} " )
73
73
guard let castedStmt = stmt. as ( Self . self) else {
74
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: stmt)
74
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: stmt)
75
75
}
76
76
self = castedStmt
77
77
self . body = try CodeBlockSyntax ( statements: bodyBuilder ( ) )
@@ -121,7 +121,7 @@ public extension HasTrailingOptionalCodeBlock where Self: DeclSyntaxProtocol {
121
121
init ( _ header: SyntaxNodeString , @CodeBlockItemListBuilder bodyBuilder: ( ) throws -> CodeBlockItemListSyntax ) throws {
122
122
let decl = DeclSyntax ( " \( header) {} " )
123
123
guard let castedDecl = decl. as ( Self . self) else {
124
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: decl)
124
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: decl)
125
125
}
126
126
self = castedDecl
127
127
self . body = try CodeBlockSyntax ( statements: bodyBuilder ( ) )
@@ -166,7 +166,7 @@ public extension HasTrailingMemberDeclBlock where Self: DeclSyntaxProtocol {
166
166
init ( _ header: SyntaxNodeString , @MemberBlockItemListBuilder membersBuilder: ( ) throws -> MemberBlockItemListSyntax ) throws {
167
167
let decl = DeclSyntax ( " \( header) {} " )
168
168
guard let castedDecl = decl. as ( Self . self) else {
169
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: decl)
169
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: decl)
170
170
}
171
171
self = castedDecl
172
172
self . memberBlock = try MemberBlockSyntax ( members: membersBuilder ( ) )
@@ -209,7 +209,7 @@ public extension IfExprSyntax {
209
209
) throws {
210
210
let expr = ExprSyntax ( " \( header) {} " )
211
211
guard let ifExpr = expr. as ( Self . self) else {
212
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: expr)
212
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: expr)
213
213
}
214
214
self = ifExpr
215
215
self . body = try CodeBlockSyntax ( statements: bodyBuilder ( ) )
@@ -254,7 +254,7 @@ public extension IfExprSyntax {
254
254
init ( _ header: SyntaxNodeString , @CodeBlockItemListBuilder bodyBuilder: ( ) throws -> CodeBlockItemListSyntax , elseIf: IfExprSyntax ) throws {
255
255
let expr = ExprSyntax ( " \( header) {} " )
256
256
guard let ifExpr = expr. as ( Self . self) else {
257
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: expr)
257
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: expr)
258
258
}
259
259
self = ifExpr
260
260
self . body = CodeBlockSyntax ( statements: try bodyBuilder ( ) )
@@ -321,7 +321,7 @@ public extension SwitchExprSyntax {
321
321
init ( _ header: SyntaxNodeString , @SwitchCaseListBuilder casesBuilder: ( ) throws -> SwitchCaseListSyntax = { SwitchCaseListSyntax ( [ ] ) } ) throws {
322
322
let expr = ExprSyntax ( " \( header) {} " )
323
323
guard let switchExpr = expr. as ( Self . self) else {
324
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: expr)
324
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: expr)
325
325
}
326
326
self = switchExpr
327
327
self . cases = try casesBuilder ( )
@@ -355,7 +355,7 @@ public extension VariableDeclSyntax {
355
355
init ( _ header: SyntaxNodeString , @CodeBlockItemListBuilder accessor: ( ) throws -> CodeBlockItemListSyntax ) throws {
356
356
let decl = DeclSyntax ( " \( header) {} " )
357
357
guard let castedDecl = decl. as ( Self . self) else {
358
- throw SyntaxStringInterpolationError . producedInvalidNodeType ( expectedType: Self . self, actualNode: decl)
358
+ throw SyntaxStringInterpolationInvalidNodeTypeError ( expectedType: Self . self, actualNode: decl)
359
359
}
360
360
self = castedDecl
361
361
precondition ( self . bindings. count == 1 )
0 commit comments