@@ -7234,14 +7234,22 @@ public struct OperatorPrecedenceAndTypesSyntax: SyntaxProtocol, SyntaxHashable {
7234
7234
public init(
7235
7235
_ unexpectedBeforeColon: UnexpectedNodesSyntax? = nil,
7236
7236
colon: TokenSyntax,
7237
- _ unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes: UnexpectedNodesSyntax? = nil,
7238
- precedenceGroupAndDesignatedTypes: IdentifierListSyntax
7237
+ _ unexpectedBetweenColonAndPrecedenceGroup: UnexpectedNodesSyntax? = nil,
7238
+ precedenceGroup: TokenSyntax,
7239
+ _ unexpectedBetweenPrecedenceGroupAndComma: UnexpectedNodesSyntax? = nil,
7240
+ comma: TokenSyntax?,
7241
+ _ unexpectedBetweenCommaAndDesignatedType: UnexpectedNodesSyntax? = nil,
7242
+ designatedType: TokenSyntax?
7239
7243
) {
7240
7244
let layout: [RawSyntax?] = [
7241
7245
unexpectedBeforeColon?.raw,
7242
7246
colon.raw,
7243
- unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes?.raw,
7244
- precedenceGroupAndDesignatedTypes.raw,
7247
+ unexpectedBetweenColonAndPrecedenceGroup?.raw,
7248
+ precedenceGroup.raw,
7249
+ unexpectedBetweenPrecedenceGroupAndComma?.raw,
7250
+ comma?.raw,
7251
+ unexpectedBetweenCommaAndDesignatedType?.raw,
7252
+ designatedType?.raw,
7245
7253
]
7246
7254
let raw = RawSyntax.makeLayout(kind: SyntaxKind.operatorPrecedenceAndTypes,
7247
7255
from: layout, arena: .default)
@@ -7290,65 +7298,134 @@ public struct OperatorPrecedenceAndTypesSyntax: SyntaxProtocol, SyntaxHashable {
7290
7298
return OperatorPrecedenceAndTypesSyntax(newData)
7291
7299
}
7292
7300
7293
- public var unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes : UnexpectedNodesSyntax? {
7301
+ public var unexpectedBetweenColonAndPrecedenceGroup : UnexpectedNodesSyntax? {
7294
7302
get {
7295
7303
let childData = data.child(at: 2, parent: Syntax(self))
7296
7304
if childData == nil { return nil }
7297
7305
return UnexpectedNodesSyntax(childData!)
7298
7306
}
7299
7307
set(value) {
7300
- self = withUnexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes (value)
7308
+ self = withUnexpectedBetweenColonAndPrecedenceGroup (value)
7301
7309
}
7302
7310
}
7303
7311
7304
- /// Returns a copy of the receiver with its `unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes ` replaced.
7305
- /// - param newChild: The new `unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes ` to replace the node's
7306
- /// current `unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes `, if present.
7307
- public func withUnexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes (
7312
+ /// Returns a copy of the receiver with its `unexpectedBetweenColonAndPrecedenceGroup ` replaced.
7313
+ /// - param newChild: The new `unexpectedBetweenColonAndPrecedenceGroup ` to replace the node's
7314
+ /// current `unexpectedBetweenColonAndPrecedenceGroup `, if present.
7315
+ public func withUnexpectedBetweenColonAndPrecedenceGroup (
7308
7316
_ newChild: UnexpectedNodesSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7309
7317
let raw = newChild?.raw
7310
7318
let newData = data.replacingChild(raw, at: 2)
7311
7319
return OperatorPrecedenceAndTypesSyntax(newData)
7312
7320
}
7313
7321
7314
7322
///
7315
- /// The precedence group and designated types for this operator
7323
+ /// The precedence group for this operator
7316
7324
///
7317
- public var precedenceGroupAndDesignatedTypes: IdentifierListSyntax {
7325
+ public var precedenceGroup: TokenSyntax {
7318
7326
get {
7319
7327
let childData = data.child(at: 3, parent: Syntax(self))
7320
- return IdentifierListSyntax (childData!)
7328
+ return TokenSyntax (childData!)
7321
7329
}
7322
7330
set(value) {
7323
- self = withPrecedenceGroupAndDesignatedTypes (value)
7331
+ self = withPrecedenceGroup (value)
7324
7332
}
7325
7333
}
7326
7334
7327
- /// Adds the provided `PrecedenceGroupAndDesignatedType` to the node's `precedenceGroupAndDesignatedTypes`
7328
- /// collection.
7329
- /// - param element: The new `PrecedenceGroupAndDesignatedType` to add to the node's
7330
- /// `precedenceGroupAndDesignatedTypes` collection.
7331
- /// - returns: A copy of the receiver with the provided `PrecedenceGroupAndDesignatedType`
7332
- /// appended to its `precedenceGroupAndDesignatedTypes` collection.
7333
- public func addPrecedenceGroupAndDesignatedType(_ element: TokenSyntax) -> OperatorPrecedenceAndTypesSyntax {
7334
- var collection: RawSyntax
7335
- if let col = raw.layoutView!.children[3] {
7336
- collection = col.layoutView!.appending(element.raw, arena: .default)
7337
- } else {
7338
- collection = RawSyntax.makeLayout(kind: SyntaxKind.identifierList,
7339
- from: [element.raw], arena: .default)
7335
+ /// Returns a copy of the receiver with its `precedenceGroup` replaced.
7336
+ /// - param newChild: The new `precedenceGroup` to replace the node's
7337
+ /// current `precedenceGroup`, if present.
7338
+ public func withPrecedenceGroup(
7339
+ _ newChild: TokenSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7340
+ let raw = newChild?.raw ?? RawSyntax.makeMissingToken(kind: TokenKind.identifier(""), arena: .default)
7341
+ let newData = data.replacingChild(raw, at: 3)
7342
+ return OperatorPrecedenceAndTypesSyntax(newData)
7343
+ }
7344
+
7345
+ public var unexpectedBetweenPrecedenceGroupAndComma: UnexpectedNodesSyntax? {
7346
+ get {
7347
+ let childData = data.child(at: 4, parent: Syntax(self))
7348
+ if childData == nil { return nil }
7349
+ return UnexpectedNodesSyntax(childData!)
7340
7350
}
7341
- let newData = data.replacingChild(collection, at: 3)
7351
+ set(value) {
7352
+ self = withUnexpectedBetweenPrecedenceGroupAndComma(value)
7353
+ }
7354
+ }
7355
+
7356
+ /// Returns a copy of the receiver with its `unexpectedBetweenPrecedenceGroupAndComma` replaced.
7357
+ /// - param newChild: The new `unexpectedBetweenPrecedenceGroupAndComma` to replace the node's
7358
+ /// current `unexpectedBetweenPrecedenceGroupAndComma`, if present.
7359
+ public func withUnexpectedBetweenPrecedenceGroupAndComma(
7360
+ _ newChild: UnexpectedNodesSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7361
+ let raw = newChild?.raw
7362
+ let newData = data.replacingChild(raw, at: 4)
7342
7363
return OperatorPrecedenceAndTypesSyntax(newData)
7343
7364
}
7344
7365
7345
- /// Returns a copy of the receiver with its `precedenceGroupAndDesignatedTypes` replaced.
7346
- /// - param newChild: The new `precedenceGroupAndDesignatedTypes` to replace the node's
7347
- /// current `precedenceGroupAndDesignatedTypes`, if present.
7348
- public func withPrecedenceGroupAndDesignatedTypes(
7349
- _ newChild: IdentifierListSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7350
- let raw = newChild?.raw ?? RawSyntax.makeEmptyLayout(kind: SyntaxKind.identifierList, arena: .default)
7351
- let newData = data.replacingChild(raw, at: 3)
7366
+ public var comma: TokenSyntax? {
7367
+ get {
7368
+ let childData = data.child(at: 5, parent: Syntax(self))
7369
+ if childData == nil { return nil }
7370
+ return TokenSyntax(childData!)
7371
+ }
7372
+ set(value) {
7373
+ self = withComma(value)
7374
+ }
7375
+ }
7376
+
7377
+ /// Returns a copy of the receiver with its `comma` replaced.
7378
+ /// - param newChild: The new `comma` to replace the node's
7379
+ /// current `comma`, if present.
7380
+ public func withComma(
7381
+ _ newChild: TokenSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7382
+ let raw = newChild?.raw
7383
+ let newData = data.replacingChild(raw, at: 5)
7384
+ return OperatorPrecedenceAndTypesSyntax(newData)
7385
+ }
7386
+
7387
+ public var unexpectedBetweenCommaAndDesignatedType: UnexpectedNodesSyntax? {
7388
+ get {
7389
+ let childData = data.child(at: 6, parent: Syntax(self))
7390
+ if childData == nil { return nil }
7391
+ return UnexpectedNodesSyntax(childData!)
7392
+ }
7393
+ set(value) {
7394
+ self = withUnexpectedBetweenCommaAndDesignatedType(value)
7395
+ }
7396
+ }
7397
+
7398
+ /// Returns a copy of the receiver with its `unexpectedBetweenCommaAndDesignatedType` replaced.
7399
+ /// - param newChild: The new `unexpectedBetweenCommaAndDesignatedType` to replace the node's
7400
+ /// current `unexpectedBetweenCommaAndDesignatedType`, if present.
7401
+ public func withUnexpectedBetweenCommaAndDesignatedType(
7402
+ _ newChild: UnexpectedNodesSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7403
+ let raw = newChild?.raw
7404
+ let newData = data.replacingChild(raw, at: 6)
7405
+ return OperatorPrecedenceAndTypesSyntax(newData)
7406
+ }
7407
+
7408
+ ///
7409
+ /// The designated types for this operator
7410
+ ///
7411
+ public var designatedType: TokenSyntax? {
7412
+ get {
7413
+ let childData = data.child(at: 7, parent: Syntax(self))
7414
+ if childData == nil { return nil }
7415
+ return TokenSyntax(childData!)
7416
+ }
7417
+ set(value) {
7418
+ self = withDesignatedType(value)
7419
+ }
7420
+ }
7421
+
7422
+ /// Returns a copy of the receiver with its `designatedType` replaced.
7423
+ /// - param newChild: The new `designatedType` to replace the node's
7424
+ /// current `designatedType`, if present.
7425
+ public func withDesignatedType(
7426
+ _ newChild: TokenSyntax?) -> OperatorPrecedenceAndTypesSyntax {
7427
+ let raw = newChild?.raw
7428
+ let newData = data.replacingChild(raw, at: 7)
7352
7429
return OperatorPrecedenceAndTypesSyntax(newData)
7353
7430
}
7354
7431
}
@@ -7358,8 +7435,12 @@ extension OperatorPrecedenceAndTypesSyntax: CustomReflectable {
7358
7435
return Mirror(self, children: [
7359
7436
"unexpectedBeforeColon": unexpectedBeforeColon.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7360
7437
"colon": Syntax(colon).asProtocol(SyntaxProtocol.self),
7361
- "unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes": unexpectedBetweenColonAndPrecedenceGroupAndDesignatedTypes.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7362
- "precedenceGroupAndDesignatedTypes": Syntax(precedenceGroupAndDesignatedTypes).asProtocol(SyntaxProtocol.self),
7438
+ "unexpectedBetweenColonAndPrecedenceGroup": unexpectedBetweenColonAndPrecedenceGroup.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7439
+ "precedenceGroup": Syntax(precedenceGroup).asProtocol(SyntaxProtocol.self),
7440
+ "unexpectedBetweenPrecedenceGroupAndComma": unexpectedBetweenPrecedenceGroupAndComma.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7441
+ "comma": comma.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7442
+ "unexpectedBetweenCommaAndDesignatedType": unexpectedBetweenCommaAndDesignatedType.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7443
+ "designatedType": designatedType.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
7363
7444
])
7364
7445
}
7365
7446
}
0 commit comments