Skip to content

Commit 43651a3

Browse files
committed
Improve descriptions
Use struct declaration instead of struct to be more specific Try to match TSPL conventions when discussing grammar Remove semantic details
1 parent 35ffc00 commit 43651a3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ public let DECL_NODES: [Node] = [
18231823
}
18241824
```
18251825
1826-
A struct can optionally declare no members.
1826+
A struct declaration may be declared without any members.
18271827
""",
18281828
kind: "Decl",
18291829
traits: [
@@ -1836,51 +1836,51 @@ public let DECL_NODES: [Node] = [
18361836
name: "Attributes",
18371837
kind: .collection(kind: "AttributeList", collectionElementName: "Attribute"),
18381838
nameForDiagnostics: "attributes",
1839-
description: "Attributes that are attached to the struct.",
1839+
description: "Attributes that are attached to the struct declaration.",
18401840
isOptional: true
18411841
),
18421842
Child(
18431843
name: "Modifiers",
18441844
kind: .collection(kind: "ModifierList", collectionElementName: "Modifier"),
18451845
nameForDiagnostics: "modifiers",
1846-
description: "Modifiers that are attached to the struct.",
1846+
description: "Modifiers that are attached to the struct declaration.",
18471847
isOptional: true
18481848
),
18491849
Child(
18501850
name: "StructKeyword",
18511851
kind: .token(choices: [.keyword(text: "struct")]),
1852-
description: "The struct keyword."
1852+
description: "The struct declaration keyword."
18531853
),
18541854
Child(
18551855
name: "Identifier",
18561856
kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
1857-
description: "The struct identifier."
1857+
description: "The struct declaration identifier. If the identifier matches a reserved keyword it must be enclosed in backticks."
18581858
),
18591859
Child(
18601860
name: "GenericParameterClause",
18611861
kind: .node(kind: "GenericParameterClause"),
18621862
nameForDiagnostics: "generic parameter clause",
1863-
description: "The generic parameters of the struct.",
1863+
description: "The generic parameters of the struct declaration.",
18641864
isOptional: true
18651865
),
18661866
Child(
18671867
name: "InheritanceClause",
18681868
kind: .node(kind: "TypeInheritanceClause"),
18691869
nameForDiagnostics: "type inheritance clause",
1870-
description: "The inheritance clause of the struct type. This clause can contain only one or more protocols.",
1870+
description: "The struct declaration inheritance clause. It may contain one or more type identifiers.",
18711871
isOptional: true
18721872
),
18731873
Child(
18741874
name: "GenericWhereClause",
18751875
kind: .node(kind: "GenericWhereClause"),
18761876
nameForDiagnostics: "generic where clause",
1877-
description: "The generic where clause of the struct",
1877+
description: "The generic where clause of the struct.",
18781878
isOptional: true
18791879
),
18801880
Child(
18811881
name: "MemberBlock",
18821882
kind: .node(kind: "MemberDeclBlock"),
1883-
description: "The members of the struct. Struct extensions may declare additional members so the contents of this block should not be assumed to be the complete member list for this struct."
1883+
description: "The members of the struct declaration. Because struct extension declarations may declare additional members the contents of this block may not always be the complete list of all members for this type."
18841884
),
18851885
]
18861886
),

0 commit comments

Comments
 (0)