Skip to content

Commit 44162b5

Browse files
committed
Make CodeBlockItemSyntax conform to SyntaxParseable and SyntaxExpressibleByStringInterpolation
1 parent 2d42e8d commit 44162b5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Sources/SwiftParser/generated/Parser+Entry.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ extension CatchClauseSyntax: SyntaxParseable {
6565
}
6666
}
6767

68+
extension CodeBlockItemSyntax: SyntaxParseable {
69+
public static func parse(from parser: inout Parser) -> Self {
70+
guard let node = parser.parseCodeBlockItem() else {
71+
assertionFailure("Invalid code block item")
72+
return Syntax(raw: RawSyntax(parser.parseCodeBlockItem()!)).cast(Self.self)
73+
}
74+
let raw = RawSyntax(parser.parseRemainder(into:node))
75+
return Syntax(raw: raw).cast(Self.self)
76+
}
77+
}
78+
6879
extension DeclSyntax: SyntaxParseable {
6980
public static func parse(from parser: inout Parser) -> Self {
7081
let node = parser.parseDeclaration()

Sources/SwiftSyntaxBuilder/generated/SyntaxExpressibleByStringInterpolationConformances.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ extension AttributeSyntax: SyntaxExpressibleByStringInterpolation {}
3232

3333
extension CatchClauseSyntax: SyntaxExpressibleByStringInterpolation {}
3434

35+
extension CodeBlockItemSyntax: SyntaxExpressibleByStringInterpolation {}
36+
3537
extension DeclSyntax: SyntaxExpressibleByStringInterpolation {}
3638

3739
extension ExprSyntax: SyntaxExpressibleByStringInterpolation {}

0 commit comments

Comments
 (0)