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
Copy file name to clipboardExpand all lines: CodeGeneration/Sources/generate-swift-syntax/LayoutNode+Extensions.swift
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,14 @@ extension LayoutNode {
41
41
}
42
42
43
43
/// Generates a convenience memberwise SyntaxNode initializer based on a
44
-
/// given ``NodeInitRule``.
44
+
/// given ``ConvenienceInitRule``.
45
45
///
46
46
/// - parameters:
47
-
/// - rule: The ``NodeInitRule`` to use for generating the initializer. Applying a rule will make some children non-optional, and set default values for other children.
47
+
/// - rule: The ``ConvenienceInitRule`` to use for generating the initializer. Applying a rule will make some children non-optional, and set default values for other children.
48
48
/// - useDeprecatedChildName: Whether to use the deprecated child name for the initializer parameter.
49
49
/// - returns:
50
50
/// - ``SyntaxNodeString``: The generated initializer.
/// Creates an ``EnumCaseParameterSyntax`` with a `firstName`, and automatically adds a `colon` to it.
43
-
///
44
-
/// - SeeAlso: For more information on the arguments, see ``EnumCaseParameterSyntax/init(leadingTrivia:_:modifiers:_:firstName:_:secondName:_:colon:_:type:_:defaultArgument:_:trailingComma:_:trailingTrivia:)``
45
-
///
46
-
publicinit(
47
-
leadingTrivia:Trivia?=nil,
48
-
modifiers:DeclModifierListSyntax=[],
49
-
firstName:TokenSyntax,
50
-
secondName:TokenSyntax?=nil,
51
-
colon:TokenSyntax=TokenSyntax.colonToken(),
52
-
type:someTypeSyntaxProtocol,
53
-
defaultValue:InitializerClauseSyntax?=nil,
54
-
trailingComma:TokenSyntax?=nil,
55
-
trailingTrivia:Trivia?=nil
56
-
){
57
-
self.init(
58
-
leadingTrivia: leadingTrivia,
59
-
modifiers: modifiers,
60
-
firstName: firstName asTokenSyntax?,
61
-
secondName: secondName,
62
-
colon: colon,
63
-
type: type,
64
-
defaultValue: defaultValue,
65
-
trailingComma: trailingComma,
66
-
trailingTrivia: trailingTrivia
67
-
)
68
-
}
69
-
}
70
-
71
13
extensionMemberAccessExprSyntax{
72
14
/// Creates a new ``MemberAccessExprSyntax`` where the accessed member is represented by
73
15
/// an identifier without specifying argument labels.
Copy file name to clipboardExpand all lines: Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1585,6 +1585,32 @@ public struct ClosureCaptureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN
1585
1585
self._syntaxNode =Syntax(data)
1586
1586
}
1587
1587
1588
+
/// A convenience initializer for ``ClosureCaptureSyntax``
1589
+
/// that takes a non-optional value for `name` parameter,
1590
+
/// and adds the following default values:
1591
+
/// - `equal`: `TokenSyntax.equalToken()`
1592
+
///
1593
+
publicinit(
1594
+
leadingTrivia:Trivia?=nil,
1595
+
specifier:ClosureCaptureSpecifierSyntax?=nil,
1596
+
name:TokenSyntax,
1597
+
equal:TokenSyntax?=.equalToken(),
1598
+
expression:someExprSyntaxProtocol,
1599
+
trailingComma:TokenSyntax?=nil,
1600
+
trailingTrivia:Trivia?=nil
1601
+
1602
+
){
1603
+
self.init(
1604
+
leadingTrivia: leadingTrivia,
1605
+
specifier: specifier,
1606
+
name: name asTokenSyntax?,
1607
+
equal: equal,
1608
+
expression: expression,
1609
+
trailingComma: trailingComma,
1610
+
trailingTrivia: trailingTrivia
1611
+
)
1612
+
}
1613
+
1588
1614
/// - Parameters:
1589
1615
/// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored.
1590
1616
/// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored.
Copy file name to clipboardExpand all lines: Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesEF.swift
+59Lines changed: 59 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -982,6 +982,36 @@ public struct EnumCaseParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt
982
982
self._syntaxNode =Syntax(data)
983
983
}
984
984
985
+
/// A convenience initializer for ``EnumCaseParameterSyntax``
986
+
/// that takes a non-optional value for `firstName` parameter,
987
+
/// and adds the following default values:
988
+
/// - `colon`: `TokenSyntax.colonToken()`
989
+
///
990
+
publicinit(
991
+
leadingTrivia:Trivia?=nil,
992
+
modifiers:DeclModifierListSyntax=[],
993
+
firstName:TokenSyntax,
994
+
secondName:TokenSyntax?=nil,
995
+
colon:TokenSyntax?=.colonToken(),
996
+
type:someTypeSyntaxProtocol,
997
+
defaultValue:InitializerClauseSyntax?=nil,
998
+
trailingComma:TokenSyntax?=nil,
999
+
trailingTrivia:Trivia?=nil
1000
+
1001
+
){
1002
+
self.init(
1003
+
leadingTrivia: leadingTrivia,
1004
+
modifiers: modifiers,
1005
+
firstName: firstName asTokenSyntax?,
1006
+
secondName: secondName,
1007
+
colon: colon,
1008
+
type: type,
1009
+
defaultValue: defaultValue,
1010
+
trailingComma: trailingComma,
1011
+
trailingTrivia: trailingTrivia
1012
+
)
1013
+
}
1014
+
985
1015
/// - Parameters:
986
1016
/// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored.
987
1017
/// - colon: If the parameter has a label, the colon separating the label from the type.
@@ -3128,6 +3158,35 @@ public struct FunctionCallExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE
3128
3158
self._syntaxNode =Syntax(data)
3129
3159
}
3130
3160
3161
+
/// A convenience initializer for ``FunctionCallExprSyntax``
3162
+
/// that takes a non-optional value for `arguments` parameter,
/// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored.
3133
3192
/// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored.
0 commit comments