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
/// 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.
84
+
///
85
+
/// For example the following function has header `func addOne(_ base: Int) -> Int` and the body will contain an `ExprSyntax` with text `return base + 1`.
/// Constructs a syntax node where `header` builds the text of the node before the members in braces and `membersBuilder` is used to list the node’s members.
117
+
///
118
+
/// For example the following function has header `struct Point` and the body will contain two `DeclSyntax` with text `var x: Int` and `var y: Int`, respecitively.
/// Constructs an `if` expression with an optional `else` block.
153
+
///
154
+
/// `header` specifies the part of the `if` expression before the body’s first brace. For example the following `if` expression has the header `if sunny`
155
+
///
156
+
/// ```swift
157
+
/// if sunny {
158
+
/// sunbath()
159
+
/// }
160
+
/// ```
161
+
///
162
+
/// If `elseBuilder` is not `nil`, an `else` keyword will automatically be inserted.
163
+
///
164
+
/// This function takes care of inserting the braces as well.
@@ -147,6 +212,9 @@ public extension IfExprSyntax {
147
212
// MARK: - SwitchCase
148
213
149
214
extensionSwitchCaseSyntax{
215
+
/// Constructs a case item where `header` includes the text between the `case` keyword and the `:` (both inclusive) and `statementsBuilder` can be used to build the statements inside the case item.
216
+
///
217
+
/// For example, a `default` case has header `default:`.
0 commit comments