Skip to content

Commit 1df2e44

Browse files
committed
Address test failures be renaming child nodes and adding a trait
1 parent 9d7be37 commit 1df2e44

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public let COMMON_NODES: [Node] = [
8484
base: .syntax,
8585
nameForDiagnostics: "thrown type clause",
8686
documentation: "The specific error type that a function can throw.",
87+
traits: [
88+
"Parenthesized",
89+
],
8790
children: [
8891
Child(
8992
name: "leftParen",
@@ -125,7 +128,7 @@ public let COMMON_NODES: [Node] = [
125128
isOptional: true
126129
),
127130
Child(
128-
name: "thrownType",
131+
name: "thrownError",
129132
kind: .node(kind: .thrownTypeClause),
130133
experimentalFeature: .typedThrows,
131134
documentation: "The specific error type thrown by this accessor.",
@@ -155,7 +158,7 @@ public let COMMON_NODES: [Node] = [
155158
isOptional: true
156159
),
157160
Child(
158-
name: "thrownType",
161+
name: "thrownError",
159162
kind: .node(kind: .thrownTypeClause),
160163
experimentalFeature: .typedThrows,
161164
documentation: "The specific error type thrown by this function.",
@@ -364,7 +367,7 @@ public let COMMON_NODES: [Node] = [
364367
isOptional: true
365368
),
366369
Child(
367-
name: "thrownType",
370+
name: "thrownError",
368371
kind: .node(kind: .thrownTypeClause),
369372
experimentalFeature: .typedThrows,
370373
documentation: "The specific error type thrown by this function type.",

CodeGeneration/Sources/SyntaxSupport/Traits.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public let TRAITS: [Trait] = [
5858
Child(name: "throwsSpecifier", kind: .token(choices: [.keyword(.throws), .keyword(.rethrows)]), isOptional: true),
5959
Child(name: "unexpectedBetweenThrowsSpecifierAndThrownType", kind: .node(kind: .unexpectedNodes), isOptional: true),
6060
Child(
61-
name: "thrownType",
61+
name: "thrownError",
6262
kind: .node(kind: .thrownTypeClause),
6363
experimentalFeature: .typedThrows,
6464
documentation: "The specific thrown error type.",

0 commit comments

Comments
 (0)