You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adopt With(Optional)CodeBlockSyntax in SwiftSyntaxBuilder
These traits cover the `body` that's a code block in various syntax nodes.
Make `HasTrailingCodeBlock` inherit from `WithCodeBlock`. It only applies
to a subset of
Eliminate `HasTrailingOptionalCodeBlock` in favor of
`WithOptionalCodeBlock`. We don't need the extra protocol for
customization.
/// Constructs a syntax node where `header` builds the text of the node before the body in braces and `bodyBuilder` is used to build the node’s body.
99
95
///
100
96
/// For example, you can construct
@@ -114,10 +110,6 @@ public protocol HasTrailingOptionalCodeBlock {
114
110
/// ```
115
111
///
116
112
/// Throws an error if `header` defines a different node type than the type the initializer is called on. E.g. if calling `try FunctionDeclSyntax("init") {}`
0 commit comments