|
10 | 10 | //
|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 |
|
| 13 | +extension EnumCaseParameterSyntax { |
| 14 | + |
| 15 | + /// Creates an `EnumCaseParameterSyntax` with a `firstName`, and automatically adds a `colon` to it. |
| 16 | + /// |
| 17 | + /// - SeeAlso: For more information on the arguments, see ``EnumCaseParameterSyntax/init(leadingTrivia:_:modifiers:_:firstName:_:secondName:_:colon:_:type:_:defaultArgument:_:trailingComma:_:trailingTrivia:)`` |
| 18 | + /// |
| 19 | + public init( |
| 20 | + leadingTrivia: Trivia? = nil, |
| 21 | + modifiers: DeclModifierListSyntax = [], |
| 22 | + firstName: TokenSyntax, |
| 23 | + secondName: TokenSyntax? = nil, |
| 24 | + colon: TokenSyntax = TokenSyntax.colonToken(), |
| 25 | + type: some TypeSyntaxProtocol, |
| 26 | + defaultValue: InitializerClauseSyntax? = nil, |
| 27 | + trailingComma: TokenSyntax? = nil, |
| 28 | + trailingTrivia: Trivia? = nil |
| 29 | + ) { |
| 30 | + self.init( |
| 31 | + leadingTrivia: leadingTrivia, |
| 32 | + modifiers: modifiers, |
| 33 | + firstName: firstName as TokenSyntax?, |
| 34 | + secondName: secondName, |
| 35 | + colon: colon, |
| 36 | + type: type, |
| 37 | + defaultValue: defaultValue, |
| 38 | + trailingComma: trailingComma, |
| 39 | + trailingTrivia: trailingTrivia |
| 40 | + ) |
| 41 | + } |
| 42 | +} |
| 43 | + |
13 | 44 | extension MemberAccessExprSyntax {
|
14 | 45 | /// Creates a new ``MemberAccessExprSyntax`` where the accessed member is represented by
|
15 | 46 | /// an identifier without specifying argument labels.
|
@@ -45,3 +76,8 @@ extension MemberAccessExprSyntax {
|
45 | 76 | )
|
46 | 77 | }
|
47 | 78 | }
|
| 79 | + |
| 80 | +//==========================================================================// |
| 81 | +// IMPORTANT: If you are tempted to add an extension here, please insert // |
| 82 | +// it in alphabetical order above // |
| 83 | +//==========================================================================// |
0 commit comments