@@ -242,7 +242,9 @@ public let DECL_NODES: [Node] = [
242242 base: . decl,
243243 nameForDiagnostics: " associatedtype declaration " ,
244244 documentation: """
245- An associated type declaration like the following.
245+ An `associatedtype` declaration
246+
247+ An example of an associatedtype declaration is
246248
247249 ```swift
248250 associatedtype Item
@@ -332,7 +334,9 @@ public let DECL_NODES: [Node] = [
332334 base: . decl,
333335 nameForDiagnostics: " class " ,
334336 documentation: """
335- A class declaration like the following.
337+ A `class` declaration
338+
339+ An example of a class declaration is
336340
337341 ```swift
338342 class SomeClass {
@@ -498,7 +502,9 @@ public let DECL_NODES: [Node] = [
498502 base: . decl,
499503 nameForDiagnostics: " deinitializer " ,
500504 documentation: """
501- A deinitializer declaration like the following.
505+ A `deint` declaration
506+
507+ An example of a deinitializer is
502508
503509 ```swift
504510 deinit {
@@ -1135,7 +1141,9 @@ public let DECL_NODES: [Node] = [
11351141 base: . decl,
11361142 nameForDiagnostics: " import " ,
11371143 documentation: """
1138- An import declaration like the following.
1144+ An `import` declaration
1145+
1146+ An example of an import declaration is
11391147
11401148 ```swift
11411149 import Foundation
@@ -1180,7 +1188,11 @@ public let DECL_NODES: [Node] = [
11801188 . keyword( text: " func " ) ,
11811189 . keyword( text: " inout " ) ,
11821190 ] ) ,
1183- documentation: " The kind of declaration being imported. For example, a struct can be imported from a specific module. " ,
1191+ documentation: """
1192+ The kind of declaration being imported.
1193+
1194+ A struct can be imported from a specific module.
1195+ """ ,
11841196 isOptional: true
11851197 ) ,
11861198 Child (
@@ -1241,7 +1253,9 @@ public let DECL_NODES: [Node] = [
12411253 base: . decl,
12421254 nameForDiagnostics: " initializer " ,
12431255 documentation: """
1244- An initializer declaration like the following.
1256+ An `init` declaration
1257+
1258+ An example of an initializer is
12451259
12461260 ```swift
12471261 init(someParameter: Int) {
@@ -1927,7 +1941,9 @@ public let DECL_NODES: [Node] = [
19271941 base: . decl,
19281942 nameForDiagnostics: " protocol " ,
19291943 documentation: """
1930- A protocol declaration like the following.
1944+ A `protocol` declaration
1945+
1946+ An example of a protocol declaration is
19311947
19321948 ```swift
19331949 protocol Example {
@@ -2048,61 +2064,63 @@ public let DECL_NODES: [Node] = [
20482064 base: . decl,
20492065 nameForDiagnostics: " struct " ,
20502066 documentation: """
2051- A struct declaration like the following.
2067+ A ` struct` declaration
20522068
2053- ```swift
2054- struct SomeStruct {
2055- let someMember: String
2056- var anotherMember: Int
2057-
2058- func foo() {
2059- print(someMember)
2060- }
2061-
2062- mutating func bar() {
2063- anotherMember = 42
2064- }
2065- }
2066- ```
2069+ An example of a struct declaration is
20672070
2068- A struct declaration may be declared without any members.
2071+ ```swift
2072+ struct SomeStruct {
2073+ let someMember: String
2074+ var anotherMember: Int
20692075
2070- ```swift
2071- struct EmptyStruct {
2076+ func foo() {
2077+ print(someMember)
2078+ }
20722079
2073- }
2074- ```
2080+ mutating func bar() {
2081+ anotherMember = 42
2082+ }
2083+ }
2084+ ```
20752085
2076- A struct declaration may include a type inheritance clause listing
2077- one or more protocols the struct conforms to.
2086+ A struct declaration may be declared without any members.
20782087
2079- The example below uses Hashable and Equatable protocols whose members
2080- are automatically synthesized by the compiler if the struct contains
2081- stored members that are themselves `Hashable` and `Equatable`.
2088+ ```swift
2089+ struct EmptyStruct {
20822090
2083- ```swift
2084- struct AdvancedStruct: Hashable, Equatable {
2085- let someMember: String
2086- var anotherMember: Int
2087- }
2088- ```
2091+ }
2092+ ```
20892093
2090- A struct declaration may include a generic parameter clause as well
2091- as a generic where clause .
2094+ A struct declaration may include a type inheritance clause listing
2095+ one or more protocols the struct conforms to .
20922096
2093- ```swift
2094- struct Stack<Element> {
2095- var items: [Element] = []
2096-
2097- mutating func push(_ item: Element) {
2098- items.append(item)
2099- }
2100-
2101- mutating func pop() -> Element {
2102- return items.removeLast()
2103- }
2104- }
2105- ```
2097+ The example below uses Hashable and Equatable protocols whose members
2098+ are automatically synthesized by the compiler if the struct contains
2099+ stored members that are themselves `Hashable` and `Equatable`.
2100+
2101+ ```swift
2102+ struct AdvancedStruct: Hashable, Equatable {
2103+ let someMember: String
2104+ var anotherMember: Int
2105+ }
2106+ ```
2107+
2108+ A struct declaration may include a generic parameter clause as well
2109+ as a generic where clause.
2110+
2111+ ```swift
2112+ struct Stack<Element> {
2113+ var items: [Element] = []
2114+
2115+ mutating func push(_ item: Element) {
2116+ items.append(item)
2117+ }
2118+
2119+ mutating func pop() -> Element {
2120+ return items.removeLast()
2121+ }
2122+ }
2123+ ```
21062124 """ ,
21072125 traits: [
21082126 " DeclGroup " ,
0 commit comments