@@ -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) {
@@ -1900,7 +1914,9 @@ public let DECL_NODES: [Node] = [
19001914 base: . decl,
19011915 nameForDiagnostics: " protocol " ,
19021916 documentation: """
1903- A protocol declaration like the following.
1917+ A `protocol` declaration
1918+
1919+ An example of a protocol declaration is
19041920
19051921 ```swift
19061922 protocol Example {
@@ -2021,61 +2037,63 @@ public let DECL_NODES: [Node] = [
20212037 base: . decl,
20222038 nameForDiagnostics: " struct " ,
20232039 documentation: """
2024- A struct declaration like the following.
2040+ A ` struct` declaration
20252041
2026- ```swift
2027- struct SomeStruct {
2028- let someMember: String
2029- var anotherMember: Int
2042+ An example of a struct declaration is
20302043
2031- func foo() {
2032- print(someMember)
2033- }
2044+ ```swift
2045+ struct SomeStruct {
2046+ let someMember: String
2047+ var anotherMember: Int
20342048
2035- mutating func bar() {
2036- anotherMember = 42
2037- }
2038- }
2039- ```
2049+ func foo() {
2050+ print(someMember)
2051+ }
20402052
2041- A struct declaration may be declared without any members.
2053+ mutating func bar() {
2054+ anotherMember = 42
2055+ }
2056+ }
2057+ ```
20422058
2043- ```swift
2044- struct EmptyStruct {
2059+ A struct declaration may be declared without any members.
20452060
2046- }
2047- ```
2061+ ```swift
2062+ struct EmptyStruct {
20482063
2049- A struct declaration may include a type inheritance clause listing
2050- one or more protocols the struct conforms to.
2064+ }
2065+ ```
20512066
2052- The example below uses Hashable and Equatable protocols whose members
2053- are automatically synthesized by the compiler if the struct contains
2054- stored members that are themselves `Hashable` and `Equatable`.
2067+ A struct declaration may include a type inheritance clause listing
2068+ one or more protocols the struct conforms to.
20552069
2056- ```swift
2057- struct AdvancedStruct: Hashable, Equatable {
2058- let someMember: String
2059- var anotherMember: Int
2060- }
2061- ```
2070+ The example below uses Hashable and Equatable protocols whose members
2071+ are automatically synthesized by the compiler if the struct contains
2072+ stored members that are themselves `Hashable` and `Equatable`.
2073+
2074+ ```swift
2075+ struct AdvancedStruct: Hashable, Equatable {
2076+ let someMember: String
2077+ var anotherMember: Int
2078+ }
2079+ ```
20622080
2063- A struct declaration may include a generic parameter clause as well
2064- as a generic where clause.
2081+ A struct declaration may include a generic parameter clause as well
2082+ as a generic where clause.
20652083
2066- ```swift
2067- struct Stack<Element> {
2068- var items: [Element] = []
2084+ ```swift
2085+ struct Stack<Element> {
2086+ var items: [Element] = []
20692087
2070- mutating func push(_ item: Element) {
2071- items.append(item)
2072- }
2088+ mutating func push(_ item: Element) {
2089+ items.append(item)
2090+ }
20732091
2074- mutating func pop() -> Element {
2075- return items.removeLast()
2076- }
2077- }
2078- ```
2092+ mutating func pop() -> Element {
2093+ return items.removeLast()
2094+ }
2095+ }
2096+ ```
20792097 """ ,
20802098 traits: [
20812099 " DeclGroup " ,
0 commit comments